Search one or more files for lines that match a
regular expression pattern. Regular expressions
are described in Chapter 20. Exit status is 0 if
any lines match, 1 if none match, and 2 for errors. See also
Don’t suppress output lines with binary data; treat as text.
Print num lines of text that occur after the matching line.
Print the byte offset within the input file before each line of output.
Print num lines of text that occur before the matching line.
Treat binary files as specified. By default,
treats binary files as such (type is
binary). If a matching string is found within a
grep reports only that the file
matches; nothing is printed for nonmatching binary files. If
grep assumes binary files don’t
match and skips them altogether. Same as
a type of
grep to treat binary files as text and print all
matched lines. Same as
Print only a count of matched lines. With the
--invert-match option, count nonmatching lines.
Print num lines of leading and trailing context. Default context is 2 lines.
Define an action for processing directories. Possible actions are:
Read directories like ordinary files (default).