Searching for Text Inside Files

The grep command is the one to remember.

Examples:
grep "Alexander Hamilton" essay.txt
grep -l "Alexander Hamilton" *
egrep "^[0-9].*SOLD$" real_estate.txt

Tasks:

Tips:



Previous - Viewing the Contents of Files

Next - Searching for Files

Home


List of Links:

  1. Steve Ramsay's Guide to Regular Expressions
  2. Learning to Use regular Expressions, from IBM