|
|
coherent
grep Command grep
Pattern search
ggrreepp [ooppttiioonn ...] [_p_a_t_t_e_r_n] [_f_i_l_e ...]
grep searches each file for occurrences of the pattern (sometimes
called a regular expression). If no file is specified, grep
searches the standard input. The pattern is given in the same
manner as to ed. Normally, grep prints each line matching the
pattern.
The following options are available.
-bb With each output line, print the block number in which the
line started (used to search file systems).
-cc Print the count of matching lines rather than the lines.
-ee The next argument is pattern (useful if the pattern starts
with `-').
-ff The next argument is a file containing a list of patterns
separated by newlines; there is no pattern argument.
-hh When more than one file is specified, output lines are norm-
ally accompanied by the file name; -h suppresses this.
-ll Print the name of each file containing matching lines rather
than the lines.
-nn The line number in the file accompanies each line printed.
-ss Suppress all output, just return status.
-vv Print a line if the pattern is not found in the line.
-xx Print the line only if it is exactly the same as the pattern;
treat wildcards in the pattern as plain text.
-yy Lower-case letters in the pattern match lower-case and upper-
case letters on the input lines.
***** See Also *****
awk, commands, ed, egrep, expr, lex, sed
***** Diagnostics *****
grep returns an exit status of zero for success, one for no
matches, two for error.
***** Notes *****
egrep is an extended and faster version of grep.
COHERENT Lexicon Page 1
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.