Blogs

Grep

Utility used to manage string search in files

-v

Reverse match

# Get all lines in file.txt that do not start with # 
$ grep -v '^#' /var/file.txt

-e

Concatenate criteria

​# Get all line in file.txt that do not start with # or $
$ grep -v -e '^#' -e '^$' /var/file.txt

Pages

Subscribe to RSS - blogs