The name grep is short for ''generalized regular expression parser.'' The command grep is a UNIX filter that allows searches for regular expressions and fixed strings within ascii documents.
Regular expressions are patterns or templates that are defined by a combination of ascii strings and metacharacters. The metacharacters, characters that represent something other than their literal meaning, allow you to specify search tasks such as ''Find all strings that start at the beginning of a line that contain a character sequence with three g's in it''.
There is actually a family of grep commands, each command designed for a different task:
grep <expression> <filename> [<filename>...]
The fgrep command is similar, except that it searches only for fixed strings:
fgrep <string(s)> <filename> [<filename>...]
Grep commands can be restricted to a single filename, or can be told to search a series of files, either by listing them in order, or by using wildcard characters.
For specific details on the specific metacharacters used and options available for the grep commands, see the online manual page for grep.