grep

The purpose of this document is to describe good ways of using grep.

Grep recursively through files for a string:

  • grep -r "modules" .

Grep for a file and exclude comments:

  • cat <file> | grep ^[^#]

[Edit]