

z, -null-data a data line ends in 0 byte, not newline no-ignore-case do not ignore case distinctions (default) i, -ignore-case ignore case distinctions in patterns and data e, -regexp=PATTERNS use PATTERNS for matching P, -perl-regexp PATTERNS are Perl regular expressions

G, -basic-regexp PATTERNS are basic regular expressions E, -extended-regexp PATTERNS are extended regular expressions PATTERNS can contain multiple patterns separated by newlines. Įxample: grep -i 'hello world' menu.h main.c The grep command provides a lot of options and help information about these options can be displayed with the -help option like below.

The grep command has the following syntax. PATTERNS can be simple text, number, string, or regex (regular expressions). From an academic point of view, the grep command searches for PATTERNS in each FILE. The grep command is the very popular command used to filter string, text, and data in files and command outputs.
