grep comes with a rich set of options:
some from POSIX and some being GNU extensions.
Long option names are always a GNU extension,
even for options that are from POSIX specifications.
Options that are specified by POSIX,
under their short names,
are explicitly marked as such
to facilitate POSIX-portable programming.
A few option names are provided
for compatibility with older or more exotic implementations.
|• Generic Program Information:|
|• Matching Control:|
|• General Output Control:|
|• Output Line Prefix Control:|
|• Context Line Control:|
|• File and Directory Selection:|
|• Other Options:|
Several additional options control
which variant of the
grep matching engine is used.
See grep Programs.