Previous slide Next slide Back to the first slide View text version


Notes:

In the first example, grep doesn’t support logical ORings of regular expressions (as the pipe character in quotes denotes match the first or match the next; and so forth)

As demonstrated in the second example, egrep supports logical ORing. This examples demonstrates why its best to use egrep when not looking for a fixed string! In this match, we’re looking for those lines that have the word paper or people. Lines 19, 20, and 22 satisfies this expression from the fortunes file.

REMEMBER: The speed of a grep command’s execution is predicated upon the complexity of the pattern match; or regular expression defined!