3 grep, g \- search a file for a pattern
26 (standard input default)
27 for lines that match the
29 a regular expression as defined in
31 with the addition of a newline character as an alternative
34 with lowest precedence.
35 Normally, each line matching the pattern is `selected',
36 and each selected line is copied to the standard output.
40 Print only a count of matching lines.
44 Do not print file name tags (headers) with output lines.
47 The following argument is taken as a
49 This option makes it easy to specify patterns that
50 might confuse argument parsing, such as
54 Ignore alphabetic case distinctions. The implementation
55 folds into lower case all letters in the pattern and input before
56 interpretation. Matched lines are printed in their original form.
59 (ell) Print the names of files with selected lines; don't print the lines.
62 Print the names of files with no selected lines;
67 Mark each printed line with its line number counted in its file.
70 Produce no output, but return status.
73 Reverse: print lines that do not match the pattern.
76 The pattern argument is the name of a file containing regular
77 expressions one per line.
80 Don't buffer the output: write each output line as soon as it is discovered.
83 Output lines are tagged by file name when there is more than one
85 (To force this tagging, include
87 as a file name argument.)
89 Care should be taken when
90 using the shell metacharacters
95 it is safest to enclose the
98 .BR \&\|' \|.\|.\|.\| ' .
99 An expression starting with '*'
100 will treat the rest of the expression
101 as literal characters.
106 and forces tagging of output lines by file name.
107 If no files are listed, it searches all files matching
110 *.C *.b *.c *.h *.m *.cc *.java *.cgi *.pl *.py *.tex *.ms
123 Exit status is null if any lines are selected,
124 or non-null when no lines are selected or an error occurs.