print lines matching a pattern
|
-R, -r, --recursive
Read all files under each directory, recursively; this is equivalent to the -d recurse option.
|
-n, --line-number
Prefix each line of output with the 1-based line number within its input file. (-n is specified
by POSIX.)
|
-w, --word-regexp
Select only those lines containing matches that form whole words. The test is that the matching
substring must either be at the beginning of the line, or preceded by a non-word constituent
character. Similarly, it must be either at the end of the line or followed by a non-word
constituent character. Word-constituent characters are letters, digits, and the underscore.
|
-i, --ignore-case
Ignore case distinctions in both the PATTERN and the input files. (-i is specified by POSIX.)
|
grep searches the named input FILEs (or standard input if no files are named, or if a single hyphen-minus
(-) is given as file name) for lines containing a match to the given PATTERN. By default, grep prints
the matching lines.
|
Matching Control
-e PATTERN, --regexp=PATTERN
Use PATTERN as the pattern. This can be used to specify multiple search patterns, or to protect a
pattern beginning with a hyphen (-). (-e is specified by POSIX.)
|