Chapter 4. The grep Family

 <  Day Day Up  >  

Chapter 4. The grep Family

The grep family consists of the commands grep , egrep , and fgrep . The grep command globally searches for regular expressions in files and prints all lines that contain the expression. The egrep and fgrep commands are simply variants of grep . The egrep command is an extended grep , supporting more regular expression metacharacters. The fgrep command, called fixed grep , and sometimes fast grep , treats all characters as literals; that is, regular expression metacharacters aren't special ”they match themselves . The Free Software Foundation provides a free version of grep , called GNU grep . These versions of grep are the ones used on Linux systems, and can be found in /usr/xpg4/bin on Sun's Solaris OS. The GNU version of grep has extended the basic regular expression metacharacter set, added POSIX compliancy, and included a number of new command-line options. They also provide a recursive grep called rgrep for descending entire directory trees.

 <  Day Day Up  >  


UNIX Shells by Example
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors: Ellie Quigley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net