Chapter 8. The grep family

Grep, I believe, is one of the most widely used tools in UNIX or LINUX. Grep (global regular expression print) allows you to search through a text file or text files for a pattern. If the pattern is found, grep will print out all the lines that contain that pattern. Grep supports the regular expressions (basic) as well as the extended set. Grep comes in three variations, which are:

Grep: This is the standard grep. It has been around the longest and is the one we’ll focus on.

Egrep: Extended grep. This supports the basic and extended regular expression range except for the use of the \{ pattern range. There are a couple of other patterns egrep gets picky on, but we won’t discuss them here.

Fgrep: Fast grep. Allows ...

Get Linux and Unix Shell Programming 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.