WHAT'S NEW?
Loading...

grep -v with multiple patterns.

View Config Files Without Comments

grep -vE "(^$|^#)" /etc/squid/squid.conf.default
or
grep ^[^#] /etc/squid/squid.conf.default

  1. http://stackoverflow.com/questions/364105/using-grep-with-regular-expression-to-filter-out-matches
  2. http://stackoverflow.com/questions/614654/linux-removing-files-that-dont-contain-all-the-words-specified
  3. http://www.linuxquestions.org/questions/linux-general-1/grep-remove-lines-which-only-contain-whitespace-721566/
  4. http://www.commandlinefu.com/commands/view/3877/grep-v-with-multiple-patterns.
  5. http://www.linuxjournal.com/content/tech-tip-view-config-files-without-comments

0 comments: