GREP(1)

NAME
grep - search a file for lines containing a given pattern

SYNOPSIS
grep [-elnsv] pattern [file] ...

OPTIONS

EXAMPLES

DESCRIPTION

Grep searches one or more files (by default, stdin) and selects out all the lines that match the pattern. All the regular expressions accepted by ed and mined are allowed. In addition, + can be used instead of * to mean 1 or more occurrences, ? can be used to mean 0 or 1 occurrences, and | can be used between two regular expressions to mean either one of them. Parentheses can be used for grouping. If a match is found, exit status 0 is returned. If no match is found, exit status 1 is returned. If an error is detected, exit status 2 is returned.

SEE ALSO
cgrep(1), fgrep(1), sed(1), awk(9).