{
    "content": [
        {
            "type": "text",
            "text": "# grep(1) (man)\n\n**Summary:** grep, egrep, fgrep, rgrep - print lines that match patterns\n\n**Synopsis:** grep [OPTION...] PATTERNS [FILE...]\ngrep [OPTION...] -e PATTERNS ... [FILE...]\ngrep [OPTION...] -f PATTERNFILE ... [FILE...]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -V | --version | — | Output the version number of grep and exit. |\n| -E | --extended-regexp | — | Interpret PATTERNS as extended regular expressions (EREs, see below). |\n| -F | --fixed-strings | — | Interpret PATTERNS as fixed strings, not regular expressions. |\n| -G | --basic-regexp | — | Interpret PATTERNS as basic regular expressions (BREs, see below). This is the default. |\n| -P | --perl-regexp | — | Interpret I<PATTERNS> as Perl-compatible regular expressions (PCREs). This option is experimental when combined with the |\n| -e | — | — | Use PATTERNS as the patterns. If this option is used multiple times or is combined with the -f (--file) option, search f |\n| -f | — | — | Obtain patterns from FILE, one per line. If this option is used multiple times or is combined with the -e (--regexp) opt |\n| -i | --ignore-case | — | Ignore case distinctions in patterns and input data, so that characters that differ only in case match each other. |\n| — | --no-ignore-case | — | Do not ignore case distinctions in patterns and input data. This is the default. This option is useful for passing to sh |\n| -v | --invert-match | — | Invert the sense of matching, to select non-matching lines. |\n| -w | --word-regexp | — | Select only those lines containing matches that form whole words. The test is that the matching substring must either be |\n| -x | --line-regexp | — | Select only those matches that exactly match the whole line. For a regular expression pattern, this is like parenthesizi |\n| -i | — | — |  |\n| -c | --count | — | Suppress normal output; instead print a count of matching lines for each input file. With the -v, --invert-match option  |\n| -L | --files-without-match | — | Suppress normal output; instead print the name of each input file from which no output would normally have been printed. |\n| -l | --files-with-matches | — | Suppress normal output; instead print the name of each input file from which output would normally have been printed. Sc |\n| -m | — | — | Stop reading a file after NUM matching lines. If the input is standard input from a regular file, and NUM matching lines |\n| -o | --only-matching | — | Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line. |\n| -q | --silent | — | Quiet; do not write anything to standard output. Exit immediately with zero status if any match is found, even if an err |\n| -s | --no-messages | — | Suppress error messages about nonexistent or unreadable files. |\n| -b | --byte-offset | — | Print the 0-based byte offset within the input file before each line of output. If -o (--only-matching) is specified, pr |\n| -H | --with-filename | — | Print the file name for each match. This is the default when there is more than one file to search. This is a GNU extens |\n| -h | --no-filename | — | Suppress the prefixing of file names on output. This is the default when there is only one file (or only standard input) |\n| -n | --line-number | — | Prefix each line of output with the 1-based line number within its input file. |\n| -T | --initial-tab | — | Make sure that the first character of actual line content lies on a tab stop, so that the alignment of tabs looks normal |\n| -Z | --null | — | Output a zero byte (the ASCII NUL character) instead of the character that normally follows a file name. For example, gr |\n| -A | — | — | Print NUM lines of trailing context after matching lines. Places a line containing a group separator (--) between contig |\n| -B | — | — | Print NUM lines of leading context before matching lines. Places a line containing a group separator (--) between contig |\n| -C | — | — | Print NUM lines of output context. Places a line containing a group separator (--) between contiguous groups of matches. |\n| — | --no-group-separator | — | When -A, -B, or -C are in use, do not print a separator between groups of lines. |\n| -a | --text | — | Process a binary file as if it were text; this is equivalent to the --binary-files=text option. --binary-files=TYPE If a |\n| -D | — | — | If an input file is a device, FIFO or socket, use ACTION to process it. By default, ACTION is read, which means that dev |\n| -d | — | — | If an input file is a directory, use ACTION to process it. By default, ACTION is read, i.e., read directories just as if |\n| -I | — | — | the --binary-files=without-match option. --include=GLOB Search only files whose base name matches GLOB (using wildcard m |\n| -r | --recursive | — | Read all files under each directory, recursively, following symbolic links only if they are on the command line. Note th |\n| -R | --dereference-recursive | — | Read all files under each directory, recursively. Follow all symbolic links, unlike -r. |\n| — | --line-buffered | — | Use line buffering on output. This can cause a performance penalty. |\n| -U | --binary | — | Treat the file(s) as binary. By default, under MS-DOS and MS-Windows, grep guesses whether a file is text or binary as d |\n| -z | --null-data | — | Treat input and output data as sequences of lines, each terminated by a zero byte (the ASCII NUL character) instead of a |\n\n## Examples\n\n- `The following example outputs the location and contents of any line containing “f” and ending`\n- `in “.c”, within all files in the current directory whose names contain “g” and end  in  “.h”.`\n- `The  -n  option  outputs  line numbers, the -- argument treats expansions of “*g*.h” starting`\n- `with “-” as file names not options, and the empty file /dev/null causes file names to be out‐`\n- `put even if only one file name happens to be of the form “*g*.h”.`\n- `$ grep -n -- 'f.*\\.c$' *g*.h /dev/null`\n- `argmatch.h:1:/* definitions and prototypes for argmatch.c`\n- `The  only line that matches is line 1 of argmatch.h.  Note that the regular expression syntax`\n- `used in the pattern differs from the globbing syntax that the shell uses to match file names.`\n\n## See Also\n\n- awk(1)\n- cmp(1)\n- diff(1)\n- find(1)\n- perl(1)\n- sed(1)\n- sort(1)\n- xargs(1)\n- read(2)\n- pcre(3)\n- pcresyntax(3)\n- pcrepattern(3)\n- terminfo(5)\n- glob(7)\n- regex(7)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (4 lines)\n- **DESCRIPTION** (11 lines)\n- **OPTIONS** (1 lines) — 47 subsections\n  - Generic Program Information (2 lines)\n  - -V --version (2 lines)\n  - Pattern Syntax (1 lines)\n  - -E --extended-regexp (2 lines)\n  - -F --fixed-strings (2 lines)\n  - -G --basic-regexp (3 lines)\n  - -P --perl-regexp (4 lines)\n  - Matching Control (1 lines)\n  - -e --regexp= (4 lines)\n  - -f --file= (4 lines)\n  - -i --ignore-case (3 lines)\n  - --no-ignore-case (4 lines)\n  - -v --invert-match (2 lines)\n  - -w --word-regexp (7 lines)\n  - -x --line-regexp (3 lines)\n  - -y -i (1 lines)\n  - General Output Control (1 lines)\n  - -c --count (11 lines)\n  - -L --files-without-match (3 lines)\n  - -l --files-with-matches (3 lines)\n  - -m --max-count= (9 lines)\n  - -o --only-matching (3 lines)\n  - -q --quiet --silent (4 lines)\n  - -s --no-messages (2 lines)\n  - Output Line Prefix Control (1 lines)\n  - -b --byte-offset (3 lines)\n  - -H --with-filename (3 lines)\n  - -h --no-filename (8 lines)\n  - -n --line-number (2 lines)\n  - -T --initial-tab (6 lines)\n  - -Z --null (7 lines)\n  - Context Line Control (1 lines)\n  - -A --after-context= (4 lines)\n  - -B --before-context= (4 lines)\n  - -C - --context= (7 lines)\n  - --no-group-separator (2 lines)\n  - File and Directory Selection (1 lines)\n  - -a --text (33 lines)\n  - -D --devices= (4 lines)\n  - -d --directories= (23 lines)\n  - -I (8 lines)\n  - -r --recursive (4 lines)\n  - -R --dereference-recursive (3 lines)\n  - Other Options (1 lines)\n  - --line-buffered (2 lines)\n  - -U --binary (9 lines)\n  - -z --null-data (4 lines)\n- **REGULAR EXPRESSIONS** (20 lines) — 9 subsections\n  - Character Classes and Bracket Expressions (24 lines)\n  - Anchoring (3 lines)\n  - The Backslash Character and Special Expressions (5 lines)\n  - Repetition (9 lines)\n  - Concatenation (4 lines)\n  - Alternation (3 lines)\n  - Precedence (4 lines)\n  - Back-references and Subexpressions (3 lines)\n  - Basic vs Extended Regular Expressions (3 lines)\n- **EXIT STATUS** (4 lines)\n- **ENVIRONMENT** (129 lines)\n- **NOTES** (2 lines)\n- **COPYRIGHT** (5 lines)\n- **BUGS** (1 lines) — 2 subsections\n  - Reporting Bugs (4 lines)\n  - Known Bugs (6 lines)\n- **EXAMPLE** (12 lines)\n- **SEE ALSO** (1 lines) — 2 subsections\n  - Regular Manual Pages (3 lines)\n  - Full Documentation (10 lines)\n\n## Full Content\n\n### NAME\n\ngrep, egrep, fgrep, rgrep - print lines that match patterns\n\n### SYNOPSIS\n\ngrep [OPTION...] PATTERNS [FILE...]\ngrep [OPTION...] -e PATTERNS ... [FILE...]\ngrep [OPTION...] -f PATTERNFILE ... [FILE...]\n\n### DESCRIPTION\n\ngrep  searches  for  PATTERNS  in  each  FILE.  PATTERNS is one or more patterns separated by\nnewline characters, and grep prints each line that matches  a  pattern.   Typically  PATTERNS\nshould be quoted when grep is used in a shell command.\n\nA FILE of “-” stands for standard input.  If no FILE is given, recursive searches examine the\nworking directory, and nonrecursive searches read standard input.\n\nIn addition, the variant programs egrep, fgrep and rgrep are the same  as  grep -E,  grep -F,\nand  grep -r,  respectively.   These  variants  are deprecated, but are provided for backward\ncompatibility.\n\n### OPTIONS\n\n#### Generic Program Information\n\n--help Output a usage message and exit.\n\n#### -V --version\n\nOutput the version number of grep and exit.\n\n#### Pattern Syntax\n\n#### -E --extended-regexp\n\nInterpret PATTERNS as extended regular expressions (EREs, see below).\n\n#### -F --fixed-strings\n\nInterpret PATTERNS as fixed strings, not regular expressions.\n\n#### -G --basic-regexp\n\nInterpret PATTERNS as basic regular  expressions  (BREs,  see  below).   This  is  the\ndefault.\n\n#### -P --perl-regexp\n\nInterpret  I<PATTERNS> as Perl-compatible regular expressions (PCREs).  This option is\nexperimental when combined with the -z (--null-data) option, and grep -P may  warn  of\nunimplemented features.\n\n#### Matching Control\n\n#### -e --regexp=\n\nUse  PATTERNS  as  the patterns.  If this option is used multiple times or is combined\nwith the -f (--file) option, search for all patterns given.  This option can  be  used\nto protect a pattern beginning with “-”.\n\n#### -f --file=\n\nObtain  patterns from FILE, one per line.  If this option is used multiple times or is\ncombined with the -e (--regexp) option, search for all patterns given.  The empty file\ncontains zero patterns, and therefore matches nothing.\n\n#### -i --ignore-case\n\nIgnore  case  distinctions  in patterns and input data, so that characters that differ\nonly in case match each other.\n\n#### --no-ignore-case\n\nDo not ignore case distinctions in patterns and input  data.   This  is  the  default.\nThis  option is useful for passing to shell scripts that already use -i, to cancel its\neffects because the two options override each other.\n\n#### -v --invert-match\n\nInvert the sense of matching, to select non-matching lines.\n\n#### -w --word-regexp\n\nSelect only those lines containing matches that form whole words.  The  test  is  that\nthe  matching  substring must either be at the beginning of the line, or preceded by a\nnon-word constituent character.  Similarly, it must be either at the end of  the  line\nor  followed  by  a  non-word  constituent character.  Word-constituent characters are\nletters, digits, and the underscore.   This  option  has  no  effect  if  -x  is  also\nspecified.\n\n#### -x --line-regexp\n\nSelect only those matches that exactly match the whole line.  For a regular expression\npattern, this is like parenthesizing the pattern and then surrounding it with ^ and $.\n\n#### -y -i\n\n#### General Output Control\n\n#### -c --count\n\nSuppress normal output; instead print a count of matching lines for each  input  file.\nWith the -v, --invert-match option (see below), count non-matching lines.\n\n--color[=WHEN], --colour[=WHEN]\nSurround  the  matched (non-empty) strings, matching lines, context lines, file names,\nline numbers, byte offsets, and separators (for fields and groups  of  context  lines)\nwith  escape  sequences  to  display  them  in  color on the terminal.  The colors are\ndefined by the environment variable GREPCOLORS.  The deprecated environment  variable\nGREPCOLOR is still supported, but its setting does not have priority.  WHEN is never,\nalways, or auto.\n\n#### -L --files-without-match\n\nSuppress normal output; instead print the name of each input file from which no output\nwould normally have been printed.\n\n#### -l --files-with-matches\n\nSuppress  normal  output;  instead print the name of each input file from which output\nwould normally have been printed.  Scanning each input file stops upon first match.\n\n#### -m --max-count=\n\nStop reading a file after NUM matching lines.  If the input is standard input  from  a\nregular  file, and NUM matching lines are output, grep ensures that the standard input\nis positioned to just after the last matching line before exiting, regardless  of  the\npresence  of  trailing  context  lines.   This  enables  a calling process to resume a\nsearch.  When grep stops after NUM matching lines, it  outputs  any  trailing  context\nlines.   When  the  -c  or  --count  option is also used, grep does not output a count\ngreater than NUM.  When the -v or --invert-match option is also used, grep stops after\noutputting NUM non-matching lines.\n\n#### -o --only-matching\n\nPrint  only the matched (non-empty) parts of a matching line, with each such part on a\nseparate output line.\n\n#### -q --quiet --silent\n\nQuiet; do not write anything to standard output.  Exit immediately with zero status if\nany  match  is found, even if an error was detected.  Also see the -s or --no-messages\noption.\n\n#### -s --no-messages\n\nSuppress error messages about nonexistent or unreadable files.\n\n#### Output Line Prefix Control\n\n#### -b --byte-offset\n\nPrint the 0-based byte offset within the input file before each line of output.  If -o\n(--only-matching) is specified, print the offset of the matching part itself.\n\n#### -H --with-filename\n\nPrint  the  file name for each match.  This is the default when there is more than one\nfile to search.  This is a GNU extension.\n\n#### -h --no-filename\n\nSuppress the prefixing of file names on output.  This is the  default  when  there  is\nonly one file (or only standard input) to search.\n\n--label=LABEL\nDisplay  input  actually  coming  from standard input as input coming from file LABEL.\nThis can be useful for commands that transform a  file's  contents  before  searching,\ne.g., gzip -cd foo.gz | grep --label=foo -H 'some pattern'.  See also the -H option.\n\n#### -n --line-number\n\nPrefix each line of output with the 1-based line number within its input file.\n\n#### -T --initial-tab\n\nMake  sure that the first character of actual line content lies on a tab stop, so that\nthe alignment of tabs looks normal.  This is useful with  options  that  prefix  their\noutput to the actual content: -H,-n, and -b.  In order to improve the probability that\nlines from a single file will all start at the same column, this also causes the  line\nnumber and byte offset (if present) to be printed in a minimum size field width.\n\n#### -Z --null\n\nOutput  a  zero  byte (the ASCII NUL character) instead of the character that normally\nfollows a file name.  For example, grep -lZ outputs a zero byte after each  file  name\ninstead  of  the usual newline.  This option makes the output unambiguous, even in the\npresence of file names containing unusual characters like newlines.  This  option  can\nbe  used  with  commands  like find -print0, perl -0, sort -z, and xargs -0 to process\narbitrary file names, even those that contain newline characters.\n\n#### Context Line Control\n\n#### -A --after-context=\n\nPrint NUM lines of trailing context after matching lines.  Places a line containing  a\ngroup   separator  (--)  between  contiguous  groups  of  matches.   With  the  -o  or\n--only-matching option, this has no effect and a warning is given.\n\n#### -B --before-context=\n\nPrint NUM lines of leading context before matching lines.  Places a line containing  a\ngroup   separator  (--)  between  contiguous  groups  of  matches.   With  the  -o  or\n--only-matching option, this has no effect and a warning is given.\n\n#### -C - --context=\n\nPrint NUM lines of output context.  Places a line containing a  group  separator  (--)\nbetween contiguous groups of matches.  With the -o or --only-matching option, this has\nno effect and a warning is given.\n\n--group-separator=SEP\nWhen -A, -B, or -C are in use, print SEP instead of -- between groups of lines.\n\n#### --no-group-separator\n\nWhen -A, -B, or -C are in use, do not print a separator between groups of lines.\n\n#### File and Directory Selection\n\n#### -a --text\n\nProcess  a  binary  file  as  if  it  were   text;   this   is   equivalent   to   the\n--binary-files=text option.\n\n--binary-files=TYPE\nIf  a file's data or metadata indicate that the file contains binary data, assume that\nthe file is of type TYPE.  Non-text bytes  indicate  binary  data;  these  are  either\noutput  bytes  that are improperly encoded for the current locale, or null input bytes\nwhen the -z option is not given.\n\nBy default, TYPE is binary, and grep suppresses output after null input binary data is\ndiscovered,  and  suppresses  output lines that contain improperly encoded data.  When\nsome output is suppressed, grep follows any output with a one-line message saying that\na binary file matches.\n\nIf  TYPE  is without-match, when grep discovers null input binary data it assumes that\nthe rest of the file does not match; this is equivalent to the -I option.\n\nIf TYPE is text, grep processes a binary file as if it were text; this  is  equivalent\nto the -a option.\n\nWhen  type  is  binary, grep may treat non-text bytes as line terminators even without\nthe -z option.  This means choosing binary versus text can affect  whether  a  pattern\nmatches  a  file.   For  example,  when  type  is  binary the pattern q$ might match q\nimmediately followed by a null byte, even though this is  not  matched  when  type  is\ntext.   Conversely,  when type is binary the pattern . (period) might not match a null\nbyte.\n\nWarning: The -a option might output binary garbage, which can have nasty side  effects\nif  the  output  is  a  terminal  and  if the terminal driver interprets some of it as\ncommands.  On the other hand, when reading files whose text encodings are unknown,  it\ncan  be  helpful  to  use -a or to set LCALL='C' in the environment, in order to find\nmore matches even if the matches are unsafe for direct display.\n\n#### -D --devices=\n\nIf an input file is a device, FIFO or socket, use ACTION to process it.   By  default,\nACTION is read, which means that devices are read just as if they were ordinary files.\nIf ACTION is skip, devices are silently skipped.\n\n#### -d --directories=\n\nIf an input file is a directory, use ACTION to process  it.   By  default,  ACTION  is\nread,  i.e., read directories just as if they were ordinary files.  If ACTION is skip,\nsilently skip directories.  If ACTION is recurse, read all files under each directory,\nrecursively,  following  symbolic links only if they are on the command line.  This is\nequivalent to the -r option.\n\n--exclude=GLOB\nSkip any command-line file with a name suffix that matches  the  pattern  GLOB,  using\nwildcard  matching;  a  name  suffix is either the whole name, or a trailing part that\nstarts with a non-slash character immediately after a slash (/)  in  the  name.   When\nsearching recursively, skip any subfile whose base name matches GLOB; the base name is\nthe part after the last slash.  A pattern can use *, ?, and [...] as wildcards, and  \\\nto quote a wildcard or backslash character literally.\n\n--exclude-from=FILE\nSkip  files  whose  base name matches any of the file-name globs read from FILE (using\nwildcard matching as described under --exclude).\n\n--exclude-dir=GLOB\nSkip any command-line directory with a name suffix  that  matches  the  pattern  GLOB.\nWhen  searching  recursively,  skip  any  subdirectory  whose  base name matches GLOB.\nIgnore any redundant trailing slashes in GLOB.\n\n#### -I\n\nthe --binary-files=without-match option.\n\n--include=GLOB\nSearch  only  files whose base name matches GLOB (using wildcard matching as described\nunder --exclude).  If contradictory --include and --exclude  options  are  given,  the\nlast  matching  one  wins.   If  no  --include  or  --exclude options match, a file is\nincluded unless the first such option is --include.\n\n#### -r --recursive\n\nRead all files under each directory, recursively, following  symbolic  links  only  if\nthey are on the command line.  Note that if no file operand is given, B<grep> searches\nthe working directory.  This is equivalent to the -d recurse option.\n\n#### -R --dereference-recursive\n\nRead all files under each directory, recursively.  Follow all symbolic  links,  unlike\n-r.\n\n#### Other Options\n\n#### --line-buffered\n\nUse line buffering on output.  This can cause a performance penalty.\n\n#### -U --binary\n\nTreat  the  file(s)  as binary.  By default, under MS-DOS and MS-Windows, grep guesses\nwhether a file is text or binary as described for the --binary-files option.  If  grep\ndecides  the  file  is a text file, it strips the CR characters from the original file\ncontents (to make regular expressions with ^ and $  work  correctly).   Specifying  -U\noverrules  this  guesswork,  causing  all  files to be read and passed to the matching\nmechanism verbatim; if the file is a text file with CR/LF pairs at  the  end  of  each\nline,  this will cause some regular expressions to fail.  This option has no effect on\nplatforms other than MS-DOS and MS-Windows.\n\n#### -z --null-data\n\nTreat input and output data as sequences of lines, each terminated by a zero byte (the\nASCII  NUL character) instead of a newline.  Like the -Z or --null option, this option\ncan be used with commands like sort -z to process arbitrary file names.\n\n### REGULAR EXPRESSIONS\n\nA regular expression is a pattern that describes a set of strings.  Regular  expressions  are\nconstructed  analogously  to  arithmetic  expressions,  by using various operators to combine\nsmaller expressions.\n\ngrep understands three different  versions  of  regular  expression  syntax:  “basic”  (BRE),\n“extended”  (ERE)  and  “perl”  (PCRE).   In  GNU  grep  there  is no difference in available\nfunctionality between basic and extended syntaxes.  In other implementations,  basic  regular\nexpressions  are  less  powerful.   The  following  description  applies  to extended regular\nexpressions; differences for basic regular  expressions  are  summarized  afterwards.   Perl-\ncompatible   regular  expressions  give  additional  functionality,  and  are  documented  in\nB<pcresyntax>(3) and B<pcrepattern>(3), but work only if PCRE support is enabled.\n\nThe fundamental building blocks are the regular expressions that match  a  single  character.\nMost  characters,  including  all  letters  and  digits,  are  regular expressions that match\nthemselves.  Any meta-character with special meaning may be quoted by  preceding  it  with  a\nbackslash.\n\nThe  period . matches any single character.  It is unspecified whether it matches an encoding\nerror.\n\n#### Character Classes and Bracket Expressions\n\nA bracket expression is a list of characters enclosed by [ and  ].   It  matches  any  single\ncharacter  in  that  list.  If the first character of the list is the caret ^ then it matches\nany character not in the list; it is unspecified whether it matches an encoding  error.   For\nexample, the regular expression [0123456789] matches any single digit.\n\nWithin  a  bracket  expression,  a range expression consists of two characters separated by a\nhyphen.  It matches any single character that sorts between the  two  characters,  inclusive,\nusing  the  locale's  collating  sequence  and  character set.  For example, in the default C\nlocale, [a-d] is equivalent to [abcd].  Many locales sort characters in dictionary order, and\nin  these  locales  [a-d]  is  typically  not equivalent to [abcd]; it might be equivalent to\n[aBbCcDd], for example.  To obtain the traditional interpretation of bracket expressions, you\ncan use the C locale by setting the LCALL environment variable to the value C.\n\nFinally,  certain  named  classes of characters are predefined within bracket expressions, as\nfollows.  Their names are self explanatory, and they  are  [:alnum:],  [:alpha:],  [:blank:],\n[:cntrl:],  [:digit:],  [:graph:], [:lower:], [:print:], [:punct:], [:space:], [:upper:], and\n[:xdigit:].  For example, [[:alnum:]] means the character class of numbers and letters in the\ncurrent  locale.   In  the  C  locale  and  ASCII character set encoding, this is the same as\n[0-9A-Za-z].  (Note that the brackets in these class names are part of  the  symbolic  names,\nand  must  be  included in addition to the brackets delimiting the bracket expression.)  Most\nmeta-characters lose their special meaning inside bracket expressions.  To include a  literal\n] place it first in the list.  Similarly, to include a literal ^ place it anywhere but first.\nFinally, to include a literal - place it last.\n\n#### Anchoring\n\nThe caret ^ and the dollar sign $ are  meta-characters  that  respectively  match  the  empty\nstring at the beginning and end of a line.\n\n#### The Backslash Character and Special Expressions\n\nThe symbols \\< and \\> respectively match the empty string at the beginning and end of a word.\nThe symbol \\b matches the empty string at the edge of a word, and \\B matches the empty string\nprovided  it's not at the edge of a word.  The symbol \\w is a synonym for [[:alnum:]] and \\W\nis a synonym for [^[:alnum:]].\n\n#### Repetition\n\nA regular expression may be followed by one of several repetition operators:\n?      The preceding item is optional and matched at most once.\n*      The preceding item will be matched zero or more times.\n+      The preceding item will be matched one or more times.\n{n}    The preceding item is matched exactly n times.\n{n,}   The preceding item is matched n or more times.\n{,m}   The preceding item is matched at most m times.  This is a GNU extension.\n{n,m}  The preceding item is matched at least n times, but not more than m times.\n\n#### Concatenation\n\nTwo regular expressions may be concatenated; the resulting  regular  expression  matches  any\nstring  formed  by  concatenating  two  substrings  that  respectively match the concatenated\nexpressions.\n\n#### Alternation\n\nTwo regular expressions may be  joined  by  the  infix  operator  |;  the  resulting  regular\nexpression matches any string matching either alternate expression.\n\n#### Precedence\n\nRepetition  takes  precedence  over  concatenation,  which  in  turn  takes  precedence  over\nalternation.  A whole expression may be enclosed in parentheses to override these  precedence\nrules and form a subexpression.\n\n#### Back-references and Subexpressions\n\nThe back-reference \\n, where n is a single digit, matches the substring previously matched by\nthe nth parenthesized subexpression of the regular expression.\n\n#### Basic vs Extended Regular Expressions\n\nIn basic regular expressions the meta-characters ?, +, {, |, (,  and  )  lose  their  special\nmeaning; instead use the backslashed versions \\?, \\+, \\{, \\|, \\(, and \\).\n\n### EXIT STATUS\n\nNormally the exit status is 0 if a line is selected, 1 if no lines were selected, and 2 if an\nerror occurred.  However, if the -q or --quiet or --silent is used and a  line  is  selected,\nthe exit status is 0 even if an error occurred.\n\n### ENVIRONMENT\n\nThe behavior of grep is affected by the following environment variables.\n\nThe  locale  for  category  LCfoo  is specified by examining the three environment variables\nLCALL, LCfoo, LANG, in that order.  The first of these variables that is set specifies  the\nlocale.   For  example,  if  LCALL  is  not  set,  but LCMESSAGES is set to ptBR, then the\nBrazilian Portuguese locale is used for the LCMESSAGES category.  The C locale  is  used  if\nnone  of  these  environment variables are set, if the locale catalog is not installed, or if\ngrep was not compiled with national language support (NLS).   The  shell  command  locale  -a\nlists locales that are currently available.\n\nGREPCOLOR\nThis  variable  specifies the color used to highlight matched (non-empty) text.  It is\ndeprecated in favor  of  GREPCOLORS,  but  still  supported.   The  mt,  ms,  and  mc\ncapabilities of GREPCOLORS have priority over it.  It can only specify the color used\nto highlight the matching non-empty text in any matching line (a  selected  line  when\nthe  -v  command-line option is omitted, or a context line when -v is specified).  The\ndefault is 01;31, which means a bold red foreground text  on  the  terminal's  default\nbackground.\n\nGREPCOLORS\nSpecifies  the  colors  and  other  attributes  used to highlight various parts of the\noutput.  Its value  is  a  colon-separated  list  of  capabilities  that  defaults  to\nms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36   with   the   rv   and  ne  boolean\ncapabilities omitted (i.e., false).  Supported capabilities are as follows.\n\nsl=    SGR substring for whole selected  lines  (i.e.,  matching  lines  when  the  -v\ncommand-line  option  is  omitted, or non-matching lines when -v is specified).\nIf however the boolean rv capability and the -v command-line  option  are  both\nspecified,  it applies to context matching lines instead.  The default is empty\n(i.e., the terminal's default color pair).\n\ncx=    SGR substring for whole context lines (i.e., non-matching  lines  when  the  -v\ncommand-line  option  is  omitted, or matching lines when -v is specified).  If\nhowever the boolean rv capability and  the  -v  command-line  option  are  both\nspecified,  it  applies to selected non-matching lines instead.  The default is\nempty (i.e., the terminal's default color pair).\n\nrv     Boolean  value  that  reverses  (swaps)  the  meanings  of  the  sl=  and   cx=\ncapabilities  when  the  -v  command-line  option is specified.  The default is\nfalse (i.e., the capability is omitted).\n\nmt=01;31\nSGR substring for matching  non-empty  text  in  any  matching  line  (i.e.,  a\nselected  line  when  the  -v command-line option is omitted, or a context line\nwhen -v is specified).  Setting this is equivalent to setting both ms= and  mc=\nat  once to the same value.  The default is a bold red text foreground over the\ncurrent line background.\n\nms=01;31\nSGR substring for matching non-empty text in a selected line.   (This  is  only\nused  when  the  -v command-line option is omitted.)  The effect of the sl= (or\ncx= if rv) capability remains active when this kicks in.  The default is a bold\nred text foreground over the current line background.\n\nmc=01;31\nSGR  substring  for  matching  non-empty text in a context line.  (This is only\nused when the -v command-line option is specified.)  The effect of the cx=  (or\nsl= if rv) capability remains active when this kicks in.  The default is a bold\nred text foreground over the current line background.\n\nfn=35  SGR substring for file names prefixing any content  line.   The  default  is  a\nmagenta text foreground over the terminal's default background.\n\nln=32  SGR  substring  for  line numbers prefixing any content line.  The default is a\ngreen text foreground over the terminal's default background.\n\nbn=32  SGR substring for byte offsets prefixing any content line.  The  default  is  a\ngreen text foreground over the terminal's default background.\n\nse=36  SGR  substring  for  separators  that are inserted between selected line fields\n(:), between context line fields, (-), and between  groups  of  adjacent  lines\nwhen  nonzero context is specified (--).  The default is a cyan text foreground\nover the terminal's default background.\n\nne     Boolean value that prevents clearing to the end of line  using  Erase  in  Line\n(EL)  to  Right  (\\33[K)  each  time  a colorized item ends.  This is needed on\nterminals on which EL is not supported.  It is otherwise  useful  on  terminals\nfor  which  the  backcolorerase  (bce)  boolean  terminfo capability does not\napply, when the chosen highlight colors do not affect the background,  or  when\nEL  is  too  slow  or causes too much flicker.  The default is false (i.e., the\ncapability is omitted).\n\nNote that boolean capabilities have no =... part.  They are omitted (i.e.,  false)  by\ndefault and become true when specified.\n\nSee  the  Select  Graphic  Rendition  (SGR)  section  in the documentation of the text\nterminal that is used for permitted values and their meaning as character  attributes.\nThese  substring values are integers in decimal representation and can be concatenated\nwith semicolons.  grep takes care  of  assembling  the  result  into  a  complete  SGR\nsequence  (\\33[...m).   Common  values  to  concatenate  include  1  for  bold,  4 for\nunderline, 5 for blink, 7 for inverse, 39 for default foreground color, 30 to  37  for\nforeground  colors,  90  to 97 for 16-color mode foreground colors, 38;5;0 to 38;5;255\nfor 88-color and 256-color modes foreground colors, 49 for default  background  color,\n40  to  47  for background colors, 100 to 107 for 16-color mode background colors, and\n48;5;0 to 48;5;255 for 88-color and 256-color modes background colors.\n\nLCALL, LCCOLLATE, LANG\nThese variables specify the locale for the LCCOLLATE category, which  determines  the\ncollating sequence used to interpret range expressions like [a-z].\n\nLCALL, LCCTYPE, LANG\nThese  variables  specify  the  locale for the LCCTYPE category, which determines the\ntype of characters,  e.g.,  which  characters  are  whitespace.   This  category  also\ndetermines  the  character encoding, that is, whether text is encoded in UTF-8, ASCII,\nor some other encoding.  In the C or POSIX locale, all characters  are  encoded  as  a\nsingle byte and every byte is a valid character.\n\nLCALL, LCMESSAGES, LANG\nThese  variables specify the locale for the LCMESSAGES category, which determines the\nlanguage that grep uses for messages.  The default  C  locale  uses  American  English\nmessages.\n\nPOSIXLYCORRECT\nIf  set,  grep  behaves as POSIX requires; otherwise, grep behaves more like other GNU\nprograms.  POSIX requires that options that follow file names must be treated as  file\nnames;  by default, such options are permuted to the front of the operand list and are\ntreated as options.  Also, POSIX requires that unrecognized options  be  diagnosed  as\n“illegal”,  but  since  they are not really against the law the default is to diagnose\nthem  as  “invalid”.   POSIXLYCORRECT  also  disables   NGNUnonoptionargvflags,\ndescribed below.\n\nNGNUnonoptionargvflags\n(Here  N  is  grep's  numeric  process  ID.)  If the ith character of this environment\nvariable's value is 1, do not consider the ith operand of grep to be an  option,  even\nif  it  appears  to be one.  A shell can put this variable in the environment for each\ncommand it runs, specifying which operands are  the  results  of  file  name  wildcard\nexpansion  and therefore should not be treated as options.  This behavior is available\nonly with the GNU C library, and only when POSIXLYCORRECT is not set.\n\n### NOTES\n\nThis man page is maintained only fitfully; the full documentation is often more up-to-date.\n\n### COPYRIGHT\n\nCopyright 1998-2000, 2002, 2005-2021 Free Software Foundation, Inc.\n\nThis is free software; see the source for copying conditions.  There is NO warranty; not even\nfor MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n### BUGS\n\n#### Reporting Bugs\n\nEmail  bug  reports  to  the  bug-reporting  address  ⟨bug-grep@gnu.org⟩.   An  email archive\n⟨https://lists.gnu.org/mailman/listinfo/bug-grep⟩       and       a        bug        tracker\n⟨https://debbugs.gnu.org/cgi/pkgreport.cgi?package=grep⟩ are available.\n\n#### Known Bugs\n\nLarge  repetition counts in the {n,m} construct may cause grep to use lots of memory.  In ad‐\ndition, certain other obscure regular expressions require exponential time and space, and may\ncause grep to run out of memory.\n\nBack-references are very slow, and may require exponential time.\n\n### EXAMPLE\n\nThe following example outputs the location and contents of any line containing “f” and ending\nin “.c”, within all files in the current directory whose names contain “g” and end  in  “.h”.\nThe  -n  option  outputs  line numbers, the -- argument treats expansions of “*g*.h” starting\nwith “-” as file names not options, and the empty file /dev/null causes file names to be out‐\nput even if only one file name happens to be of the form “*g*.h”.\n\n$ grep -n -- 'f.*\\.c$' *g*.h /dev/null\nargmatch.h:1:/* definitions and prototypes for argmatch.c\n\nThe  only line that matches is line 1 of argmatch.h.  Note that the regular expression syntax\nused in the pattern differs from the globbing syntax that the shell uses to match file names.\n\n### SEE ALSO\n\n#### Regular Manual Pages\n\nawk(1), cmp(1), diff(1), find(1),  perl(1),  sed(1),  sort(1),  xargs(1),  read(2),  pcre(3),\npcresyntax(3), pcrepattern(3), terminfo(5), glob(7), regex(7)\n\n#### Full Documentation\n\nA  complete manual ⟨https://www.gnu.org/software/grep/manual/⟩ is available.  If the info and\ngrep programs are properly installed at your site, the command\n\ninfo grep\n\nshould give you access to the complete manual.\n\n\n\nGNU grep 3.7                                 2019-12-29                                      GREP(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "grep",
        "section": "1",
        "mode": "man",
        "summary": "grep, egrep, fgrep, rgrep - print lines that match patterns",
        "synopsis": "grep [OPTION...] PATTERNS [FILE...]\ngrep [OPTION...] -e PATTERNS ... [FILE...]\ngrep [OPTION...] -f PATTERNFILE ... [FILE...]",
        "flags": [
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Output the version number of grep and exit."
            },
            {
                "flag": "-E",
                "long": "--extended-regexp",
                "arg": null,
                "description": "Interpret PATTERNS as extended regular expressions (EREs, see below)."
            },
            {
                "flag": "-F",
                "long": "--fixed-strings",
                "arg": null,
                "description": "Interpret PATTERNS as fixed strings, not regular expressions."
            },
            {
                "flag": "-G",
                "long": "--basic-regexp",
                "arg": null,
                "description": "Interpret PATTERNS as basic regular expressions (BREs, see below). This is the default."
            },
            {
                "flag": "-P",
                "long": "--perl-regexp",
                "arg": null,
                "description": "Interpret I<PATTERNS> as Perl-compatible regular expressions (PCREs). This option is experimental when combined with the -z (--null-data) option, and grep -P may warn of unimplemented features."
            },
            {
                "flag": "-e",
                "long": null,
                "arg": null,
                "description": "Use PATTERNS as the patterns. If this option is used multiple times or is combined with the -f (--file) option, search for all patterns given. This option can be used to protect a pattern beginning with “-”."
            },
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": "Obtain patterns from FILE, one per line. If this option is used multiple times or is combined with the -e (--regexp) option, search for all patterns given. The empty file contains zero patterns, and therefore matches nothing."
            },
            {
                "flag": "-i",
                "long": "--ignore-case",
                "arg": null,
                "description": "Ignore case distinctions in patterns and input data, so that characters that differ only in case match each other."
            },
            {
                "flag": "",
                "long": "--no-ignore-case",
                "arg": null,
                "description": "Do not ignore case distinctions in patterns and input data. This is the default. This option is useful for passing to shell scripts that already use -i, to cancel its effects because the two options override each other."
            },
            {
                "flag": "-v",
                "long": "--invert-match",
                "arg": null,
                "description": "Invert the sense of matching, to select non-matching lines."
            },
            {
                "flag": "-w",
                "long": "--word-regexp",
                "arg": null,
                "description": "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. This option has no effect if -x is also specified."
            },
            {
                "flag": "-x",
                "long": "--line-regexp",
                "arg": null,
                "description": "Select only those matches that exactly match the whole line. For a regular expression pattern, this is like parenthesizing the pattern and then surrounding it with ^ and $."
            },
            {
                "flag": "-i",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-c",
                "long": "--count",
                "arg": null,
                "description": "Suppress normal output; instead print a count of matching lines for each input file. With the -v, --invert-match option (see below), count non-matching lines. --color[=WHEN], --colour[=WHEN] Surround the matched (non-empty) strings, matching lines, context lines, file names, line numbers, byte offsets, and separators (for fields and groups of context lines) with escape sequences to display them in color on the terminal. The colors are defined by the environment variable GREPCOLORS. The deprecated environment variable GREPCOLOR is still supported, but its setting does not have priority. WHEN is never, always, or auto."
            },
            {
                "flag": "-L",
                "long": "--files-without-match",
                "arg": null,
                "description": "Suppress normal output; instead print the name of each input file from which no output would normally have been printed."
            },
            {
                "flag": "-l",
                "long": "--files-with-matches",
                "arg": null,
                "description": "Suppress normal output; instead print the name of each input file from which output would normally have been printed. Scanning each input file stops upon first match."
            },
            {
                "flag": "-m",
                "long": null,
                "arg": null,
                "description": "Stop reading a file after NUM matching lines. If the input is standard input from a regular file, and NUM matching lines are output, grep ensures that the standard input is positioned to just after the last matching line before exiting, regardless of the presence of trailing context lines. This enables a calling process to resume a search. When grep stops after NUM matching lines, it outputs any trailing context lines. When the -c or --count option is also used, grep does not output a count greater than NUM. When the -v or --invert-match option is also used, grep stops after outputting NUM non-matching lines."
            },
            {
                "flag": "-o",
                "long": "--only-matching",
                "arg": null,
                "description": "Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line."
            },
            {
                "flag": "-q",
                "long": "--silent",
                "arg": null,
                "description": "Quiet; do not write anything to standard output. Exit immediately with zero status if any match is found, even if an error was detected. Also see the -s or --no-messages option."
            },
            {
                "flag": "-s",
                "long": "--no-messages",
                "arg": null,
                "description": "Suppress error messages about nonexistent or unreadable files."
            },
            {
                "flag": "-b",
                "long": "--byte-offset",
                "arg": null,
                "description": "Print the 0-based byte offset within the input file before each line of output. If -o (--only-matching) is specified, print the offset of the matching part itself."
            },
            {
                "flag": "-H",
                "long": "--with-filename",
                "arg": null,
                "description": "Print the file name for each match. This is the default when there is more than one file to search. This is a GNU extension."
            },
            {
                "flag": "-h",
                "long": "--no-filename",
                "arg": null,
                "description": "Suppress the prefixing of file names on output. This is the default when there is only one file (or only standard input) to search. --label=LABEL Display input actually coming from standard input as input coming from file LABEL. This can be useful for commands that transform a file's contents before searching, e.g., gzip -cd foo.gz | grep --label=foo -H 'some pattern'. See also the -H option."
            },
            {
                "flag": "-n",
                "long": "--line-number",
                "arg": null,
                "description": "Prefix each line of output with the 1-based line number within its input file."
            },
            {
                "flag": "-T",
                "long": "--initial-tab",
                "arg": null,
                "description": "Make sure that the first character of actual line content lies on a tab stop, so that the alignment of tabs looks normal. This is useful with options that prefix their output to the actual content: -H,-n, and -b. In order to improve the probability that lines from a single file will all start at the same column, this also causes the line number and byte offset (if present) to be printed in a minimum size field width."
            },
            {
                "flag": "-Z",
                "long": "--null",
                "arg": null,
                "description": "Output a zero byte (the ASCII NUL character) instead of the character that normally follows a file name. For example, grep -lZ outputs a zero byte after each file name instead of the usual newline. This option makes the output unambiguous, even in the presence of file names containing unusual characters like newlines. This option can be used with commands like find -print0, perl -0, sort -z, and xargs -0 to process arbitrary file names, even those that contain newline characters."
            },
            {
                "flag": "-A",
                "long": null,
                "arg": null,
                "description": "Print NUM lines of trailing context after matching lines. Places a line containing a group separator (--) between contiguous groups of matches. With the -o or --only-matching option, this has no effect and a warning is given."
            },
            {
                "flag": "-B",
                "long": null,
                "arg": null,
                "description": "Print NUM lines of leading context before matching lines. Places a line containing a group separator (--) between contiguous groups of matches. With the -o or --only-matching option, this has no effect and a warning is given."
            },
            {
                "flag": "-C",
                "long": null,
                "arg": null,
                "description": "Print NUM lines of output context. Places a line containing a group separator (--) between contiguous groups of matches. With the -o or --only-matching option, this has no effect and a warning is given. --group-separator=SEP When -A, -B, or -C are in use, print SEP instead of -- between groups of lines."
            },
            {
                "flag": "",
                "long": "--no-group-separator",
                "arg": null,
                "description": "When -A, -B, or -C are in use, do not print a separator between groups of lines."
            },
            {
                "flag": "-a",
                "long": "--text",
                "arg": null,
                "description": "Process a binary file as if it were text; this is equivalent to the --binary-files=text option. --binary-files=TYPE If a file's data or metadata indicate that the file contains binary data, assume that the file is of type TYPE. Non-text bytes indicate binary data; these are either output bytes that are improperly encoded for the current locale, or null input bytes when the -z option is not given. By default, TYPE is binary, and grep suppresses output after null input binary data is discovered, and suppresses output lines that contain improperly encoded data. When some output is suppressed, grep follows any output with a one-line message saying that a binary file matches. If TYPE is without-match, when grep discovers null input binary data it assumes that the rest of the file does not match; this is equivalent to the -I option. If TYPE is text, grep processes a binary file as if it were text; this is equivalent to the -a option. When type is binary, grep may treat non-text bytes as line terminators even without the -z option. This means choosing binary versus text can affect whether a pattern matches a file. For example, when type is binary the pattern q$ might match q immediately followed by a null byte, even though this is not matched when type is text. Conversely, when type is binary the pattern . (period) might not match a null byte. Warning: The -a option might output binary garbage, which can have nasty side effects if the output is a terminal and if the terminal driver interprets some of it as commands. On the other hand, when reading files whose text encodings are unknown, it can be helpful to use -a or to set LCALL='C' in the environment, in order to find more matches even if the matches are unsafe for direct display."
            },
            {
                "flag": "-D",
                "long": null,
                "arg": null,
                "description": "If an input file is a device, FIFO or socket, use ACTION to process it. By default, ACTION is read, which means that devices are read just as if they were ordinary files. If ACTION is skip, devices are silently skipped."
            },
            {
                "flag": "-d",
                "long": null,
                "arg": null,
                "description": "If an input file is a directory, use ACTION to process it. By default, ACTION is read, i.e., read directories just as if they were ordinary files. If ACTION is skip, silently skip directories. If ACTION is recurse, read all files under each directory, recursively, following symbolic links only if they are on the command line. This is equivalent to the -r option. --exclude=GLOB Skip any command-line file with a name suffix that matches the pattern GLOB, using wildcard matching; a name suffix is either the whole name, or a trailing part that starts with a non-slash character immediately after a slash (/) in the name. When searching recursively, skip any subfile whose base name matches GLOB; the base name is the part after the last slash. A pattern can use *, ?, and [...] as wildcards, and \\ to quote a wildcard or backslash character literally. --exclude-from=FILE Skip files whose base name matches any of the file-name globs read from FILE (using wildcard matching as described under --exclude). --exclude-dir=GLOB Skip any command-line directory with a name suffix that matches the pattern GLOB. When searching recursively, skip any subdirectory whose base name matches GLOB. Ignore any redundant trailing slashes in GLOB."
            },
            {
                "flag": "-I",
                "long": null,
                "arg": null,
                "description": "the --binary-files=without-match option. --include=GLOB Search only files whose base name matches GLOB (using wildcard matching as described under --exclude). If contradictory --include and --exclude options are given, the last matching one wins. If no --include or --exclude options match, a file is included unless the first such option is --include."
            },
            {
                "flag": "-r",
                "long": "--recursive",
                "arg": null,
                "description": "Read all files under each directory, recursively, following symbolic links only if they are on the command line. Note that if no file operand is given, B<grep> searches the working directory. This is equivalent to the -d recurse option."
            },
            {
                "flag": "-R",
                "long": "--dereference-recursive",
                "arg": null,
                "description": "Read all files under each directory, recursively. Follow all symbolic links, unlike -r."
            },
            {
                "flag": "",
                "long": "--line-buffered",
                "arg": null,
                "description": "Use line buffering on output. This can cause a performance penalty."
            },
            {
                "flag": "-U",
                "long": "--binary",
                "arg": null,
                "description": "Treat the file(s) as binary. By default, under MS-DOS and MS-Windows, grep guesses whether a file is text or binary as described for the --binary-files option. If grep decides the file is a text file, it strips the CR characters from the original file contents (to make regular expressions with ^ and $ work correctly). Specifying -U overrules this guesswork, causing all files to be read and passed to the matching mechanism verbatim; if the file is a text file with CR/LF pairs at the end of each line, this will cause some regular expressions to fail. This option has no effect on platforms other than MS-DOS and MS-Windows."
            },
            {
                "flag": "-z",
                "long": "--null-data",
                "arg": null,
                "description": "Treat input and output data as sequences of lines, each terminated by a zero byte (the ASCII NUL character) instead of a newline. Like the -Z or --null option, this option can be used with commands like sort -z to process arbitrary file names."
            }
        ],
        "examples": [
            "The following example outputs the location and contents of any line containing “f” and ending",
            "in “.c”, within all files in the current directory whose names contain “g” and end  in  “.h”.",
            "The  -n  option  outputs  line numbers, the -- argument treats expansions of “*g*.h” starting",
            "with “-” as file names not options, and the empty file /dev/null causes file names to be out‐",
            "put even if only one file name happens to be of the form “*g*.h”.",
            "$ grep -n -- 'f.*\\.c$' *g*.h /dev/null",
            "argmatch.h:1:/* definitions and prototypes for argmatch.c",
            "The  only line that matches is line 1 of argmatch.h.  Note that the regular expression syntax",
            "used in the pattern differs from the globbing syntax that the shell uses to match file names."
        ],
        "see_also": [
            {
                "name": "awk",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/awk/1/json"
            },
            {
                "name": "cmp",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/cmp/1/json"
            },
            {
                "name": "diff",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/diff/1/json"
            },
            {
                "name": "find",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/find/1/json"
            },
            {
                "name": "perl",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/perl/1/json"
            },
            {
                "name": "sed",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/sed/1/json"
            },
            {
                "name": "sort",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/sort/1/json"
            },
            {
                "name": "xargs",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/xargs/1/json"
            },
            {
                "name": "read",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/read/2/json"
            },
            {
                "name": "pcre",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/pcre/3/json"
            },
            {
                "name": "pcresyntax",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/pcresyntax/3/json"
            },
            {
                "name": "pcrepattern",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/pcrepattern/3/json"
            },
            {
                "name": "terminfo",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/terminfo/5/json"
            },
            {
                "name": "glob",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/glob/7/json"
            },
            {
                "name": "regex",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/regex/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Generic Program Information",
                        "lines": 2
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "Pattern Syntax",
                        "lines": 1
                    },
                    {
                        "name": "-E --extended-regexp",
                        "lines": 2,
                        "flag": "-E",
                        "long": "--extended-regexp"
                    },
                    {
                        "name": "-F --fixed-strings",
                        "lines": 2,
                        "flag": "-F",
                        "long": "--fixed-strings"
                    },
                    {
                        "name": "-G --basic-regexp",
                        "lines": 3,
                        "flag": "-G",
                        "long": "--basic-regexp"
                    },
                    {
                        "name": "-P --perl-regexp",
                        "lines": 4,
                        "flag": "-P",
                        "long": "--perl-regexp"
                    },
                    {
                        "name": "Matching Control",
                        "lines": 1
                    },
                    {
                        "name": "-e --regexp=",
                        "lines": 4,
                        "flag": "-e"
                    },
                    {
                        "name": "-f --file=",
                        "lines": 4,
                        "flag": "-f"
                    },
                    {
                        "name": "-i --ignore-case",
                        "lines": 3,
                        "flag": "-i",
                        "long": "--ignore-case"
                    },
                    {
                        "name": "--no-ignore-case",
                        "lines": 4,
                        "long": "--no-ignore-case"
                    },
                    {
                        "name": "-v --invert-match",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--invert-match"
                    },
                    {
                        "name": "-w --word-regexp",
                        "lines": 7,
                        "flag": "-w",
                        "long": "--word-regexp"
                    },
                    {
                        "name": "-x --line-regexp",
                        "lines": 3,
                        "flag": "-x",
                        "long": "--line-regexp"
                    },
                    {
                        "name": "-y -i",
                        "lines": 1,
                        "flag": "-i"
                    },
                    {
                        "name": "General Output Control",
                        "lines": 1
                    },
                    {
                        "name": "-c --count",
                        "lines": 11,
                        "flag": "-c",
                        "long": "--count"
                    },
                    {
                        "name": "-L --files-without-match",
                        "lines": 3,
                        "flag": "-L",
                        "long": "--files-without-match"
                    },
                    {
                        "name": "-l --files-with-matches",
                        "lines": 3,
                        "flag": "-l",
                        "long": "--files-with-matches"
                    },
                    {
                        "name": "-m --max-count=",
                        "lines": 9,
                        "flag": "-m"
                    },
                    {
                        "name": "-o --only-matching",
                        "lines": 3,
                        "flag": "-o",
                        "long": "--only-matching"
                    },
                    {
                        "name": "-q --quiet --silent",
                        "lines": 4,
                        "flag": "-q",
                        "long": "--silent"
                    },
                    {
                        "name": "-s --no-messages",
                        "lines": 2,
                        "flag": "-s",
                        "long": "--no-messages"
                    },
                    {
                        "name": "Output Line Prefix Control",
                        "lines": 1
                    },
                    {
                        "name": "-b --byte-offset",
                        "lines": 3,
                        "flag": "-b",
                        "long": "--byte-offset"
                    },
                    {
                        "name": "-H --with-filename",
                        "lines": 3,
                        "flag": "-H",
                        "long": "--with-filename"
                    },
                    {
                        "name": "-h --no-filename",
                        "lines": 8,
                        "flag": "-h",
                        "long": "--no-filename"
                    },
                    {
                        "name": "-n --line-number",
                        "lines": 2,
                        "flag": "-n",
                        "long": "--line-number"
                    },
                    {
                        "name": "-T --initial-tab",
                        "lines": 6,
                        "flag": "-T",
                        "long": "--initial-tab"
                    },
                    {
                        "name": "-Z --null",
                        "lines": 7,
                        "flag": "-Z",
                        "long": "--null"
                    },
                    {
                        "name": "Context Line Control",
                        "lines": 1
                    },
                    {
                        "name": "-A --after-context=",
                        "lines": 4,
                        "flag": "-A"
                    },
                    {
                        "name": "-B --before-context=",
                        "lines": 4,
                        "flag": "-B"
                    },
                    {
                        "name": "-C - --context=",
                        "lines": 7,
                        "flag": "-C"
                    },
                    {
                        "name": "--no-group-separator",
                        "lines": 2,
                        "long": "--no-group-separator"
                    },
                    {
                        "name": "File and Directory Selection",
                        "lines": 1
                    },
                    {
                        "name": "-a --text",
                        "lines": 33,
                        "flag": "-a",
                        "long": "--text"
                    },
                    {
                        "name": "-D --devices=",
                        "lines": 4,
                        "flag": "-D"
                    },
                    {
                        "name": "-d --directories=",
                        "lines": 23,
                        "flag": "-d"
                    },
                    {
                        "name": "-I",
                        "lines": 8,
                        "flag": "-I"
                    },
                    {
                        "name": "-r --recursive",
                        "lines": 4,
                        "flag": "-r",
                        "long": "--recursive"
                    },
                    {
                        "name": "-R --dereference-recursive",
                        "lines": 3,
                        "flag": "-R",
                        "long": "--dereference-recursive"
                    },
                    {
                        "name": "Other Options",
                        "lines": 1
                    },
                    {
                        "name": "--line-buffered",
                        "lines": 2,
                        "long": "--line-buffered"
                    },
                    {
                        "name": "-U --binary",
                        "lines": 9,
                        "flag": "-U",
                        "long": "--binary"
                    },
                    {
                        "name": "-z --null-data",
                        "lines": 4,
                        "flag": "-z",
                        "long": "--null-data"
                    }
                ]
            },
            {
                "name": "REGULAR EXPRESSIONS",
                "lines": 20,
                "subsections": [
                    {
                        "name": "Character Classes and Bracket Expressions",
                        "lines": 24
                    },
                    {
                        "name": "Anchoring",
                        "lines": 3
                    },
                    {
                        "name": "The Backslash Character and Special Expressions",
                        "lines": 5
                    },
                    {
                        "name": "Repetition",
                        "lines": 9
                    },
                    {
                        "name": "Concatenation",
                        "lines": 4
                    },
                    {
                        "name": "Alternation",
                        "lines": 3
                    },
                    {
                        "name": "Precedence",
                        "lines": 4
                    },
                    {
                        "name": "Back-references and Subexpressions",
                        "lines": 3
                    },
                    {
                        "name": "Basic vs Extended Regular Expressions",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 129,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Reporting Bugs",
                        "lines": 4
                    },
                    {
                        "name": "Known Bugs",
                        "lines": 6
                    }
                ]
            },
            {
                "name": "EXAMPLE",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Regular Manual Pages",
                        "lines": 3
                    },
                    {
                        "name": "Full Documentation",
                        "lines": 10
                    }
                ]
            }
        ]
    }
}