Chapter 3. 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 ...

Get UNIX® Shells by Example, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.