May 2000
Beginner
761 pages
18h 20m
English
egrep [ –bchilnsv ] [ –e special–expression ][ –f filename ] [ strings ] [ filename … ]
egrep (expression grep) searches files for a pattern of characters and prints all lines that contain that pattern. egrep uses full regular expressions (expressions that have string values that use the full set of alphanumeric and special characters) to match the patterns. (See Chapter 3 for grep and grep -E.)
1 egrep 'Tom|John' datafile 2 egrep '^ [A-Z]+' file |
Explanation
Displays all lines in datafile containing the pattern either Tom or John.
Displays all lines starting with one or more uppercase letters.
Read now
Unlock full access