{
    "content": [
        {
            "type": "text",
            "text": "# XZGREP (man)\n\n## NAME\n\nxzgrep - search compressed files for a regular expression\n\n## SYNOPSIS\n\nxzgrep [grepoptions] [-e] pattern file...\nxzegrep ...\nxzfgrep ...\nlzgrep ...\nlzegrep ...\nlzfgrep ...\n\n## DESCRIPTION\n\nxzgrep  invokes  grep(1)  on files which may be either uncompressed or compressed with xz(1),\nlzma(1), gzip(1), bzip2(1), lzop(1), or zstd(1).  All options specified are  passed  directly\nto grep(1).\n\n## TLDR\n\n> Search files possibly compressed with `xz`, `lzma`, `gzip`, `bzip2`, `lzop`, or `zstd` using `regex`.\n\n- Search for a pattern within a file:\n  `xzgrep \"{{search_pattern}}\" {{path/to/file}}`\n- Search for an exact string (disables `regex`):\n  `xzgrep {{-F|--fixed-strings}} \"{{exact_string}}\" {{path/to/file}}`\n- Search for a pattern in all files showing line numbers of matches:\n  `xzgrep {{-n|--line-number}} \"{{search_pattern}}\" {{path/to/file}}`\n- Print 3 lines of [C]ontext around, [B]efore, or [A]fter each match:\n  `xzgrep {{-context|--before-context|--after-context}} 3 \"{{search_pattern}}\" {{path/to/file}}`\n- Print file name and line number for each match with color output:\n  `xzgrep {{-H|--with-filename}} {{-n|--line-number}} --color=always \"{{search_pattern}}\" {{path/to/file}}`\n- Search for lines matching a pattern, printing only the matched text:\n  `xzgrep {{-o|--only-matching}} \"{{search_pattern}}\" {{path/to/file}}`\n- Use extended `regex` (supports `?`, `+`, `{}`, `()`, and `|`), in case-insensitive mode:\n  `xzgrep {{-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- **ENVIRONMENT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "XZGREP",
        "section": "",
        "mode": "man",
        "summary": "xzgrep - search compressed files for a regular expression",
        "synopsis": "xzgrep [grepoptions] [-e] pattern file...\nxzegrep ...\nxzfgrep ...\nlzgrep ...\nlzegrep ...\nlzfgrep ...",
        "tldr_summary": "Search files possibly compressed with `xz`, `lzma`, `gzip`, `bzip2`, `lzop`, or `zstd` using `regex`.",
        "tldr_examples": [
            {
                "description": "Search for a pattern within a file",
                "command": "xzgrep \"{{search_pattern}}\" {{path/to/file}}"
            },
            {
                "description": "Search for an exact string (disables `regex`)",
                "command": "xzgrep {{-F|--fixed-strings}} \"{{exact_string}}\" {{path/to/file}}"
            },
            {
                "description": "Search for a pattern in all files showing line numbers of matches",
                "command": "xzgrep {{-n|--line-number}} \"{{search_pattern}}\" {{path/to/file}}"
            },
            {
                "description": "Print 3 lines of [C]ontext around, [B]efore, or [A]fter each match",
                "command": "xzgrep {{-context|--before-context|--after-context}} 3 \"{{search_pattern}}\" {{path/to/file}}"
            },
            {
                "description": "Print file name and line number for each match with color output",
                "command": "xzgrep {{-H|--with-filename}} {{-n|--line-number}} --color=always \"{{search_pattern}}\" {{path/to/file}}"
            },
            {
                "description": "Search for lines matching a pattern, printing only the matched text",
                "command": "xzgrep {{-o|--only-matching}} \"{{search_pattern}}\" {{path/to/file}}"
            },
            {
                "description": "Use extended `regex` (supports `?`, `+`, `{}`, `()`, and `|`), in case-insensitive mode",
                "command": "xzgrep {{-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": "xz",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/xz/1/json"
            },
            {
                "name": "gzip",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/gzip/1/json"
            },
            {
                "name": "bzip2",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/bzip2/1/json"
            },
            {
                "name": "lzop",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/lzop/1/json"
            },
            {
                "name": "zstd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/zstd/1/json"
            },
            {
                "name": "zgrep",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/zgrep/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "xzgrep - search compressed files for a regular expression\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "xzgrep [grepoptions] [-e] pattern file...\nxzegrep ...\nxzfgrep ...\nlzgrep ...\nlzegrep ...\nlzfgrep ...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "xzgrep  invokes  grep(1)  on files which may be either uncompressed or compressed with xz(1),\nlzma(1), gzip(1), bzip2(1), lzop(1), or zstd(1).  All options specified are  passed  directly\nto grep(1).\n\nIf no file is specified, then standard input is decompressed if necessary and fed to grep(1).\nWhen reading from standard input, gzip(1), bzip2(1), lzop(1), and  zstd(1)  compressed  files\nare not supported.\n\nIf  xzgrep  is  invoked  as  xzegrep  or xzfgrep then egrep(1) or fgrep(1) is used instead of\ngrep(1).  The same applies to names lzgrep, lzegrep, and  lzfgrep,  which  are  provided  for\nbackward compatibility with LZMA Utils.\n",
                "subsections": []
            },
            "ENVIRONMENT": {
                "content": "GREP   If  the GREP environment variable is set, xzgrep uses it instead of grep(1), egrep(1),\nor fgrep(1).\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "grep(1), xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), zgrep(1)\n\n\n\nTukaani                                      2020-12-05                                    XZGREP(1)",
                "subsections": []
            }
        }
    }
}