manpagez: man pages & more
info grep
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1.2 Matching Control

-e pattern

Use pattern as the pattern. This can be used to specify multiple search patterns, or to protect a pattern beginning with a ‘-’. (‘-e’ is specified by POSIX.)

-f file

Obtain patterns from file, one per line. The empty file contains zero patterns, and therefore matches nothing. (‘-f’ is specified by POSIX.)


Ignore case distinctions in both the pattern and the input files. ‘-y’ is an obsolete synonym that is provided for compatibility. (‘-i’ is specified by POSIX.)


Invert the sense of matching, to select non-matching lines. (‘-v’ is specified by POSIX.)


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.


Select only those matches that exactly match the whole line. (‘-x’ is specified by POSIX.)

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on November 17, 2011 using texi2html 5.0.