O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required