{
    "content": [
        {
            "type": "text",
            "text": "# bzgrep (man)\n\n## NAME\n\nbzgrep, bzfgrep, bzegrep - search possibly bzip2 compressed files for a regular expression\n\n## SYNOPSIS\n\nbzgrep [ grepoptions ] [ -e ] pattern filename...\nbzegrep [ egrepoptions ] [ -e ] pattern filename...\nbzfgrep [ fgrepoptions ] [ -e ] pattern filename...\n\n## DESCRIPTION\n\nBzgrep is used to invoke the grep on bzip2-compressed files. All options specified are passed\ndirectly to grep.  If no file is specified, then the standard input is decompressed if neces‐\nsary  and  fed  to  grep.  Otherwise the given files are uncompressed if necessary and fed to\ngrep.\n\n## TLDR\n\n> Find patterns in `bzip2` compressed files using `grep`.\n\n- Search for a pattern within a compressed file:\n  `bzgrep \"{{search_pattern}}\" {{path/to/file}}`\n- Recursively search files in a bzip2 compressed `.tar` archive for a pattern:\n  `bzgrep {{-r|--recursive}} \"{{search_pattern}}\" {{path/to/tar_file}}`\n- Print 3 lines of [C]ontext around, [B]efore, or [A]fter each match:\n  `bzgrep {{-context|--before-context|--after-context}} 3 \"{{search_pattern}}\" {{path/to/file}}`\n- Print file name and line number for each match:\n  `bzgrep {{-H|--with-filename}} {{-n|--line-number}} \"{{search_pattern}}\" {{path/to/file}}`\n- Search for lines matching a pattern, printing only the matched text:\n  `bzgrep {{-o|--only-matching}} \"{{search_pattern}}\" {{path/to/file}}`\n- Search `stdin` for lines that do not match a pattern:\n  `cat {{path/to/bz_compressed_file}} | bzgrep {{-v|--invert-match}} \"{{search_pattern}}\"`\n- Use extended `regex` (supports `?`, `+`, `{}`, `()`, and `|`), in case-insensitive mode:\n  `bzgrep {{-E|--extended-regexp}} {{-i|--ignore-case}} \"{{search_pattern}}\" {{path/to/file}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **AUTHOR**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "bzgrep",
        "section": "",
        "mode": "man",
        "summary": "bzgrep, bzfgrep, bzegrep - search possibly bzip2 compressed files for a regular expression",
        "synopsis": "bzgrep [ grepoptions ] [ -e ] pattern filename...\nbzegrep [ egrepoptions ] [ -e ] pattern filename...\nbzfgrep [ fgrepoptions ] [ -e ] pattern filename...",
        "tldr_summary": "Find patterns in `bzip2` compressed files using `grep`.",
        "tldr_examples": [
            {
                "description": "Search for a pattern within a compressed file",
                "command": "bzgrep \"{{search_pattern}}\" {{path/to/file}}"
            },
            {
                "description": "Recursively search files in a bzip2 compressed `.tar` archive for a pattern",
                "command": "bzgrep {{-r|--recursive}} \"{{search_pattern}}\" {{path/to/tar_file}}"
            },
            {
                "description": "Print 3 lines of [C]ontext around, [B]efore, or [A]fter each match",
                "command": "bzgrep {{-context|--before-context|--after-context}} 3 \"{{search_pattern}}\" {{path/to/file}}"
            },
            {
                "description": "Print file name and line number for each match",
                "command": "bzgrep {{-H|--with-filename}} {{-n|--line-number}} \"{{search_pattern}}\" {{path/to/file}}"
            },
            {
                "description": "Search for lines matching a pattern, printing only the matched text",
                "command": "bzgrep {{-o|--only-matching}} \"{{search_pattern}}\" {{path/to/file}}"
            },
            {
                "description": "Search `stdin` for lines that do not match a pattern",
                "command": "cat {{path/to/bz_compressed_file}} | bzgrep {{-v|--invert-match}} \"{{search_pattern}}\""
            },
            {
                "description": "Use extended `regex` (supports `?`, `+`, `{}`, `()`, and `|`), in case-insensitive mode",
                "command": "bzgrep {{-E|--extended-regexp}} {{-i|--ignore-case}} \"{{search_pattern}}\" {{path/to/file}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "grep",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/grep/1/json"
            },
            {
                "name": "egrep",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/egrep/1/json"
            },
            {
                "name": "fgrep",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/fgrep/1/json"
            },
            {
                "name": "bzdiff",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/bzdiff/1/json"
            },
            {
                "name": "bzmore",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/bzmore/1/json"
            },
            {
                "name": "bzless",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/bzless/1/json"
            },
            {
                "name": "bzip2",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/bzip2/1/json"
            },
            {
                "name": "BZGREP",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/BZGREP/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "bzgrep, bzfgrep, bzegrep - search possibly bzip2 compressed files for a regular expression\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "bzgrep [ grepoptions ] [ -e ] pattern filename...\nbzegrep [ egrepoptions ] [ -e ] pattern filename...\nbzfgrep [ fgrepoptions ] [ -e ] pattern filename...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Bzgrep is used to invoke the grep on bzip2-compressed files. All options specified are passed\ndirectly to grep.  If no file is specified, then the standard input is decompressed if neces‐\nsary  and  fed  to  grep.  Otherwise the given files are uncompressed if necessary and fed to\ngrep.\n\nIf bzgrep is invoked as bzegrep or bzfgrep then egrep or fgrep is used instead of  grep.   If\nthe  GREP  environment variable is set, bzgrep uses it as the grep program to be invoked. For\nexample:\n\nfor sh:  GREP=fgrep  bzgrep string files\nfor csh: (setenv GREP fgrep; bzgrep string files)\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Charles Levert (charles@comm.polymtl.ca). Adapted to bzip2 by Philippe Troin  <phil@fifi.org>\nfor Debian GNU/Linux.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "grep(1), egrep(1), fgrep(1), bzdiff(1), bzmore(1), bzless(1), bzip2(1)\n\n\n\nBZGREP(1)",
                "subsections": []
            }
        }
    }
}