grep [-E|-F] [-c|-l|-q] [-insvx] -e pattern_list
       [-e pattern_list]... [-f pattern_file]... [file...]

grep [-E|-F] [-c|-l|-q] [-insvx] [-e pattern_list]...
       -f pattern_file [-f pattern_file]... [file...]

grep [-E|-F] [-c|-l|-q] [-insvx] pattern_list [file...]

-E
  Match using extended regular expressions. Treat each pattern specified as an ERE, as described in XBD 9.4 Extended Regular Expressions. If any entire ERE pattern matches some part of an input line excluding the terminating <newline>, the line shall be matched. A null ERE shall match every line.
-F
  Match using fixed strings. Treat each pattern specified as a string instead of a regular expression. If an input line contains any of the patterns as a contiguous sequence of bytes, the line shall be matched. A null string shall match every line.
-c
  Write only a count of selected lines to standard output.
-e pattern_list

  Specify one or more patterns to be used during the search for input. The application shall ensure that patterns in pattern_list are separated by a <newline>. A null pattern can be specified by two adjacent <newline> characters in pattern_list. Unless the -E or -F option is also specified, each pattern shall be treated as a BRE, as described in XBD 9.3 Basic Regular Expressions. Multiple -e and -f options shall be accepted by the grep utility. All of the specified patterns shall be used when matching lines, but the order of evaluation is unspecified.
-f pattern_file

  Read one or more patterns from the file named by the pathname pattern_file. Patterns in pattern_file shall be terminated by a <newline>. A null pattern can be specified by an empty line in pattern_file. Unless the -E or -F option is also specified, each pattern shall be treated as a BRE, as described in XBD 9.3 Basic Regular Expressions.
-i
  Perform pattern matching in a case-insensitive manner; see XBD 9.2 Regular Expression General Requirements.
-l
  (The letter ell.) Write only the names of files containing selected lines to standard output. Pathnames shall be written once per file searched. If the standard input is searched, a pathname of "(standard input)" shall be written, in the POSIX locale. In other locales, "standard input" may be replaced by something more appropriate in those locales.
-n
  Precede each output line by its relative line number in the file, each file starting at line 1. The line number counter shall be reset for each file processed.
-q
  Quiet. Nothing shall be written to the standard output, regardless of matching lines. Exit with zero status if an input line is selected.
-s
  Suppress the error messages ordinarily written for nonexistent or unreadable files. Other error messages shall not be suppressed.
-v
  Select lines not matching any of the specified patterns. If the -v option is not specified, selected lines shall be those that match any of the specified patterns.
-x
  Consider only input lines that use all characters in the line excluding the terminating <newline> to match an entire fixed string or regular expression to be matching lines.
