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:
  - What Mac GUI program does something
similar?
- What would be some advantages of
searching files using grepintead of the GUI?
 
Tips:
  - Read the manpage forgrepto learn
about its many options, for example the-ioption makes
the search case-insensitive.
 
- Combine grepwith thefindcommand
(described later) to find a bunch of files and search them in one
command line.
List of Links:
  - Steve Ramsay's Guide to Regular Expressions
 
- Learning to Use regular Expressions, from IBM