{
    "content": [
        {
            "type": "text",
            "text": "# zipgrep (man)\n\n## NAME\n\nzipgrep - search files in a ZIP archive for lines matching a pattern\n\n## SYNOPSIS\n\nzipgrep [egrepoptions] pattern file[.zip] [file(s) ...]  [-x xfile(s) ...]\n\n## DESCRIPTION\n\nzipgrep  will  search  files within a ZIP archive for lines matching the given string or pat‐\ntern.  zipgrep is a shell script and requires egrep(1) and unzip(1) to function.  Its  output\nis identical to that of egrep(1).\n\n## TLDR\n\n> Find patterns in files in a Zip archive using extended `regex` (supports `?`, `+`, `{}`, `()`, and `|`).\n\n- Search for a pattern within a Zip archive:\n  `zipgrep \"{{search_pattern}}\" {{path/to/file.zip}}`\n- Print file name and line number for each match:\n  `zipgrep {{-H|--with-filename}} {{-n|--line-number}} \"{{search_pattern}}\" {{path/to/file.zip}}`\n- Search for lines that do not match a pattern:\n  `zipgrep {{-v|--invert-match}} \"{{search_pattern}}\" {{path/to/file.zip}}`\n- Specify files inside a Zip archive from search:\n  `zipgrep \"{{search_pattern}}\" {{path/to/file.zip}} {{file/to/search1}} {{file/to/search2}}`\n- Exclude files inside a Zip archive from search:\n  `zipgrep \"{{search_pattern}}\" {{path/to/file.zip}} {{-x|--line-regexp}} {{file/to/exclude1}} {{file/to/exclude2}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **ARGUMENTS**\n- **OPTIONS**\n- **SEE ALSO**\n- **URL**\n- **AUTHORS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "zipgrep",
        "section": "",
        "mode": "man",
        "summary": "zipgrep - search files in a ZIP archive for lines matching a pattern",
        "synopsis": "zipgrep [egrepoptions] pattern file[.zip] [file(s) ...]  [-x xfile(s) ...]",
        "tldr_summary": "Find patterns in files in a Zip archive using extended `regex` (supports `?`, `+`, `{}`, `()`, and `|`).",
        "tldr_examples": [
            {
                "description": "Search for a pattern within a Zip archive",
                "command": "zipgrep \"{{search_pattern}}\" {{path/to/file.zip}}"
            },
            {
                "description": "Print file name and line number for each match",
                "command": "zipgrep {{-H|--with-filename}} {{-n|--line-number}} \"{{search_pattern}}\" {{path/to/file.zip}}"
            },
            {
                "description": "Search for lines that do not match a pattern",
                "command": "zipgrep {{-v|--invert-match}} \"{{search_pattern}}\" {{path/to/file.zip}}"
            },
            {
                "description": "Specify files inside a Zip archive from search",
                "command": "zipgrep \"{{search_pattern}}\" {{path/to/file.zip}} {{file/to/search1}} {{file/to/search2}}"
            },
            {
                "description": "Exclude files inside a Zip archive from search",
                "command": "zipgrep \"{{search_pattern}}\" {{path/to/file.zip}} {{-x|--line-regexp}} {{file/to/exclude1}} {{file/to/exclude2}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "egrep",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/egrep/1/json"
            },
            {
                "name": "unzip",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/unzip/1/json"
            },
            {
                "name": "zip",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/zip/1/json"
            },
            {
                "name": "funzip",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/funzip/1/json"
            },
            {
                "name": "zipcloak",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/zipcloak/1/json"
            },
            {
                "name": "zipinfo",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/zipinfo/1/json"
            },
            {
                "name": "zipnote",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/zipnote/1/json"
            },
            {
                "name": "zipsplit",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/zipsplit/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "ARGUMENTS",
                "lines": 34,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "URL",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "zipgrep - search files in a ZIP archive for lines matching a pattern\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "zipgrep [egrepoptions] pattern file[.zip] [file(s) ...]  [-x xfile(s) ...]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "zipgrep  will  search  files within a ZIP archive for lines matching the given string or pat‐\ntern.  zipgrep is a shell script and requires egrep(1) and unzip(1) to function.  Its  output\nis identical to that of egrep(1).\n",
                "subsections": []
            },
            "ARGUMENTS": {
                "content": "pattern\nThe  pattern to be located within a ZIP archive.  Any string or regular expression ac‐\ncepted by egrep(1) may be used.  file[.zip] Path of the ZIP  archive.   (Wildcard  ex‐\npressions for the ZIP archive name are not supported.)  If the literal filename is not\nfound, the suffix .zip is appended.  Note that  self-extracting  ZIP  files  are  sup‐\nported,  as  with any other ZIP archive; just specify the .exe suffix (if any) explic‐\nitly.\n\n[file(s)]\nAn optional list of archive members to be processed, separated by spaces.  If no  mem‐\nber files are specified, all members of the ZIP archive are searched.  Regular expres‐\nsions (wildcards) may be used to match multiple members:\n\n*      matches a sequence of 0 or more characters\n\n?      matches exactly 1 character\n\n[...]  matches any single character found inside the brackets; ranges are specified by\na  beginning  character,  a hyphen, and an ending character.  If an exclamation\npoint or a caret (`!' or `^') follows the left bracket, then the range of char‐\nacters  within the brackets is complemented (that is, anything except the char‐\nacters inside the brackets is considered a match).\n\n(Be sure to quote any character that might otherwise be interpreted or modified by the\noperating system.)\n\n[-x xfile(s)]\nAn  optional  list  of archive members to be excluded from processing.  Since wildcard\ncharacters match directory separators (`/'), this option may be used  to  exclude  any\nfiles  that  are in subdirectories.  For example, ``zipgrep grumpy foo *.[ch] -x */*''\nwould search for the string ``grumpy'' in all C source files in the main directory  of\nthe  ``foo''  archive,  but  none in any subdirectories.  Without the -x option, all C\nsource files in all directories within the zipfile would be searched.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "All options prior to the ZIP archive filename are passed to egrep(1).\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "egrep(1), unzip(1), zip(1), funzip(1), zipcloak(1), zipinfo(1), zipnote(1), zipsplit(1)\n",
                "subsections": []
            },
            "URL": {
                "content": "The Info-ZIP home page is currently at\nhttp://www.info-zip.org/pub/infozip/\nor\nftp://ftp.info-zip.org/pub/infozip/ .\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "zipgrep was written by Jean-loup Gailly.\n\n\n\nInfo-ZIP                                    20 April 2009                                 ZIPGREP(1)",
                "subsections": []
            }
        }
    }
}