

l (The letter ell.) Write only the names of files containing selected lines to standard output. i Perform pattern matching in searches without regard to case see XBD RegularĮxpression General Requirements. F option is also specified, each pattern shall be treated as a BRE, as described in XBD Basic Regular Expressions. A null pattern can be specified by an empty line in pattern_file. Read one or more patterns from the file named by the pathname pattern_file. All of the specified patterns shall be used when matching lines,īut the order of evaluation is unspecified. f options shall be accepted by the grep utility. Unless the -E or -F option is also specified, each pattern shall be treated as a BRE, asĭescribed in XBD Basic Regular Expressions. A null pattern can be specified by two adjacent characters The application shall ensure that patterns in Specify one or more patterns to be used during the search for input. c Write only a count of selected lines to standard output. If an input line containsĪny of the patterns as a contiguous sequence of bytes, the line shall be matched.

Treat each pattern specified as a string instead of a regular expression. Input line excluding the terminating, the line shall be matched.

If any entire ERE pattern matches some part of an Treat each pattern specified as an ERE, as described in XBD Extended Regular Expressions. The following options shall be supported: -E Match using extended regular expressions. The grep utility shall conform to XBD Utility Syntax Guidelines Similarly, since patterns are matchedĪgainst individual lines (excluding the terminating characters) of the input, there is no way for a pattern to e and -f options below), regular expressions cannot contain a. Since a separates or terminates patterns (see the Regular expression matching shall be based on text lines. By default, each selected input line shall be written to the Terminating a null BRE shall match every line. Byĭefault, an input line shall be selected if any pattern, treated as an entire basic regular expression (BRE) as described in XBD Basic Regular Expressions, matches any part of the line excluding the The pattern_list's value shall consist of one or more patterns separated by Ĭharacters the pattern_file's contents shall consist of one or more patterns terminated by a character. The patterns are specified by the -e option, -f option, or the The grep utility shall search the input files, selecting lines matching one or more patterns the types of patterns areĬontrolled by the options specified. NAME grep - search a file for a pattern SYNOPSIS The Open Group Base Specifications Isedition
