{
    "content": [
        {
            "type": "text",
            "text": "# ptargrep(1) (man)\n\n**Summary:** ptargrep - Apply pattern matching to the contents of files in a tar archive\n\n**Synopsis:** ptargrep [options] <pattern> <tar file> ...\nOptions:\n--basename|-b     ignore directory paths from archive\n--ignore-case|-i  do case-insensitive pattern matching\n--list-only|-l    list matching filenames rather than extracting matches\n--verbose|-v      write debugging message to STDERR\n--help|-?         detailed help message\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (10 lines)\n- **DESCRIPTION** (8 lines)\n- **OPTIONS** (19 lines)\n- **COPYRIGHT** (8 lines)\n\n## Full Content\n\n### NAME\n\nptargrep - Apply pattern matching to the contents of files in a tar archive\n\n### SYNOPSIS\n\nptargrep [options] <pattern> <tar file> ...\n\nOptions:\n\n--basename|-b     ignore directory paths from archive\n--ignore-case|-i  do case-insensitive pattern matching\n--list-only|-l    list matching filenames rather than extracting matches\n--verbose|-v      write debugging message to STDERR\n--help|-?         detailed help message\n\n### DESCRIPTION\n\nThis utility allows you to apply pattern matching to the contents of files contained in a tar\narchive.  You might use this to identify all files in an archive which contain lines matching\nthe specified pattern and either print out the pathnames or extract the files.\n\nThe pattern will be used as a Perl regular expression (as opposed to a simple grep regex).\n\nMultiple tar archive filenames can be specified - they will each be processed in turn.\n\n### OPTIONS\n\n--basename (alias -b)\nWhen matching files are extracted, ignore the directory path from the archive and write\nto the current directory using the basename of the file from the archive.  Beware: if two\nmatching files in the archive have the same basename, the second file extracted will\noverwrite the first.\n\n--ignore-case (alias -i)\nMake pattern matching case-insensitive.\n\n--list-only (alias -l)\nPrint the pathname of each matching file from the archive to STDOUT.  Without this\noption, the default behaviour is to extract each matching file.\n\n--verbose (alias -v)\nLog debugging info to STDERR.\n\n--help (alias -?)\nDisplay this documentation.\n\n### COPYRIGHT\n\nCopyright 2010 Grant McLean <grantm@cpan.org>\n\nThis program is free software; you can redistribute it and/or modify it under the same terms\nas Perl itself.\n\n\n\nperl v5.34.0                                 2025-07-25                                  PTARGREP(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "ptargrep",
        "section": "1",
        "mode": "man",
        "summary": "ptargrep - Apply pattern matching to the contents of files in a tar archive",
        "synopsis": "ptargrep [options] <pattern> <tar file> ...\nOptions:\n--basename|-b     ignore directory paths from archive\n--ignore-case|-i  do case-insensitive pattern matching\n--list-only|-l    list matching filenames rather than extracting matches\n--verbose|-v      write debugging message to STDERR\n--help|-?         detailed help message",
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 19,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 8,
                "subsections": []
            }
        ]
    }
}