GREP.EXE Class: UNIX Global Regular Expression Print NAME GREP Find occurences of regular expressions SYNOPSIS grep [-cfhlnvyz] []... [...] DESCRIPTION Grep is a Unix utility that permits the users to search a given set of files for the occurence of various regular expression(s). A regular expression is a text string that provides for the selection of very specific strings in the text being searched. OPTIONS -c count matching lines, no output for zero -f no regular expression given; file contains regular expressions -h no filename headers on lines -l list file names with match -n show line numbers -v show only lines that don't match -z count lines (even if if zero) EXAMPLES The best way to learn how to use grep is to try it. Grep is written to accept standard input (stdin) in lieu of a file. This permits grep to use text piped from another program such as a compiler, linker etc and select the desired lines. lc test.c | grep ^Warning,^Error This example will show any lines generated by the compiler that start with either Warning or Error. Please note that grep is case sensitive. grep -f regexp *.c This example will look for all regular expressions listed in the file regexp in all text files with .C as it's extent. Please refer to the text file on regular expressions for additional examples.