3 grep, g \- search a file for a pattern
32 (standard input default)
33 for lines that match the
35 a regular expression as defined in
37 with the addition of a newline character as an alternative
40 with lowest precedence.
41 Normally, each line matching the pattern is `selected',
42 and each selected line is copied to the standard output.
46 Print only a count of matching lines.
50 Do not print file name tags (headers) with output lines.
53 The following argument is taken as a
55 This option makes it easy to specify patterns that
56 might confuse argument parsing, such as
60 Ignore alphabetic case distinctions. The implementation
61 folds into lower case all letters in the pattern and input before
62 interpretation. Matched lines are printed in their original form.
65 (ell) Print the names of files with selected lines; don't print the lines.
68 Print the names of files with no selected lines;
73 Mark each printed line with its line number counted in its file.
76 Produce no output, but return status.
79 Reverse: print lines that do not match the pattern.
82 The pattern argument is the name of a file containing regular
83 expressions one per line.
86 Don't buffer the output: write each output line as soon as it is discovered.
89 Output lines are tagged by file name when there is more than one
91 (To force this tagging, include
93 as a file name argument.)
95 Care should be taken when
96 using the shell metacharacters
101 it is safest to enclose the
104 .BR \&\|' \|.\|.\|.\| ' .
105 An expression starting with '*'
106 will treat the rest of the expression
107 as literal characters.
114 (plus aditional flags, if provided)
115 and forces tagging of output lines by file name. If no files
116 are listed, it searches all files matching
117 .B *.b *.c *.C *.h *.l *.m *.s *.y
118 .B *.asm *.cc *.cs *.lx *.cgi *.pl
119 .B *.py *.tex *.ms *.java *.xy *.go
132 Exit status is null if any lines are selected,
133 or non-null when no lines are selected or an error occurs.