Oracle Diaries
A glance at life of an IT Developer and DBA
Tuesday, June 11, 2013
How to use grep command to exclude the lines beginning with a pattern
For instance when reading from a file you want to exclude all the comments i.e. lines beginning with hash sign (#), then use -v switch for
grep
command:
grep -v "^\#" $FILENAME
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment