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


Notes:

In the first example, we match each line in the fortunes file which includes the sequence of characters that spell the word fish (in all lowercase characters). The word can appear anywhere on the line. As a result, Lines 4, 29, and 32 satisfies this defined pattern match from the fortunes file from the fortunes file.

The second example defines a pattern match for the character string "inst". The string is to be matched anywhere on the line. One must accept on faith that information reported were the only two lines which satisfies the match from the /etc/passwd file.