The main program we will use to work with regular expressions is our old pal,
grep. The name grep is actually derived from the phrase global regular expression print, so we can see that
grep has something to do with regular expressions. In essence,
grep searches text files for the occurrence of a specified regular expression and outputs any line containing a match to standard output.
So far, we have used
grep with fixed strings, like so:
ls /usr/bin | grep zip
This will list all the files in the /usr/bin directory whose names contain the substring
grep program accepts options and arguments this way:
grep [options] regex [file...]
regex is a regular expression.
Table 19-1 lists the commonly used ...