Sunday, July 30, 2023

grep commands patterns and metacharacter classes In Linux escape "\" character importance

 


cat /etc/oratab | grep -e "^[\a-Az-Z0-9\]\{0,8\}\:*/[[:graph:]]*"


Hints:-

Always use caret "^" and "$" without escape "\"  like  "^[[:digit:]]"  or "$[[:digit:]]" .

To include forward search use "\+" or "*"  like "^[[:graph:]]\+" or "^[[:digit:]]*" .

No comments:

Post a Comment

opatchauto

# Log in as root su - root # Execute opatchauto against the unzipped patch directory /u01/app/19.0.0/ grid /OPatch/opatchauto apply /tmp/pat...