3 grep \- search a file for a pattern
23 (standard input default)
24 for lines that match the
26 a regular expression as defined in
28 with the addition of a newline character as an alternative
31 with lowest precedence.
32 Normally, each line matching the pattern is `selected',
33 and each selected line is copied to the standard output.
37 Print only a count of matching lines.
41 Do not print file name tags (headers) with output lines.
44 The following argument is taken as a
46 This option makes it easy to specify patterns that
47 might confuse argument parsing, such as
51 Ignore alphabetic case distinctions. The implementation
52 folds into lower case all letters in the pattern and input before
53 interpretation. Matched lines are printed in their original form.
56 (ell) Print the names of files with selected lines; don't print the lines.
59 Print the names of files with no selected lines;
64 Mark each printed line with its line number counted in its file.
67 Produce no output, but return status.
70 Reverse: print lines that do not match the pattern.
73 The pattern argument is the name of a file containing regular
74 expressions one per line.
77 Don't buffer the output: write each output line as soon as it is discovered.
80 Output lines are tagged by file name when there is more than one
82 (To force this tagging, include
84 as a file name argument.)
86 Care should be taken when
87 using the shell metacharacters
92 it is safest to enclose the
95 .BR \&\|' \|.\|.\|.\| ' .
96 An expression starting with '*'
97 will treat the rest of the expression
98 as literal characters.
108 Exit status is null if any lines are selected,
109 or non-null when no lines are selected or an error occurs.