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


Notes:

In the first example, we’re matching any line that ends with the d character just prior to the newline. Based upon the contents of the fortune file, line 36 satisfies that match from the fortunes file.

In the second example, we’re looking for those lines that match the pattern “/bin/sh” in the /etc/passwd file. This basically prints out those lines (accounts) that use the Bourne shell as their start up shell.