{
    "content": [
        {
            "type": "text",
            "text": "# run-parts(8) (man)\n\n**Summary:** run-parts - run scripts or programs in a directory\n\n**Synopsis:** run-parts    [--test]    [--verbose]   [--debug]   [--report]   [--lsbsysinit]   [--regex=RE]\n[--umask=umask] [--arg=argument] [--exit-on-error] [--help] [--version] [--list]  [--reverse]\n[--] DIRECTORY\nrun-parts -V\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -v | --verbose | — | print the name of each script to stderr before running. |\n| — | --report | — | similar to --verbose, but only prints the name of scripts which produce output. The script's name is printed to whicheve |\n| -d | --debug | — | print to stderr which scripts get selected for running and which don't. |\n| — | --reverse | — | reverse the scripts' execution order. |\n| — | --exit-on-error | — | exit as soon as a script returns with a non-zero exit code. |\n| — | --lsbsysinit | — | use LSB namespaces instead of classical behavior. |\n| — | --new-session | — | run each script in a separate process session. If you use this option, killing run- parts will not kill the currently ru |\n| -u | — | — | sets the umask to umask before running the scripts. umask should be specified in oc‐ tal. By default the umask is set to |\n| -a | — | — | pass argument to the scripts. Use --arg once for each argument you want passed. -- specifies that this is the end of the |\n| -h | --help | — | display usage information and exit. |\n| -V | --version | — | display version and copyright and exit. |\n\n## Examples\n\n- `Print the names of all files in /etc that start with `p' and end with `d':`\n- `run-parts --list --regex '^p.*d$' /etc`\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (6 lines)\n- **DESCRIPTION** (20 lines)\n- **OPTIONS** (5 lines) — 11 subsections\n  - -v, --verbose (2 lines)\n  - --report (4 lines)\n  - -d, --debug (2 lines)\n  - --reverse (2 lines)\n  - --exit-on-error (2 lines)\n  - --lsbsysinit (2 lines)\n  - --new-session (7 lines)\n  - -u, --umask= (3 lines)\n  - -a, --arg= (5 lines)\n  - -h, --help (2 lines)\n  - -V, --version (3 lines)\n- **EXAMPLES** (5 lines)\n- **COPYRIGHT** (14 lines)\n\n## Full Content\n\n### NAME\n\nrun-parts - run scripts or programs in a directory\n\n### SYNOPSIS\n\nrun-parts    [--test]    [--verbose]   [--debug]   [--report]   [--lsbsysinit]   [--regex=RE]\n[--umask=umask] [--arg=argument] [--exit-on-error] [--help] [--version] [--list]  [--reverse]\n[--] DIRECTORY\n\nrun-parts -V\n\n### DESCRIPTION\n\nrun-parts  runs  all  the executable files named within constraints described below, found in\ndirectory directory.  Other files and directories are silently ignored.\n\nIf neither the --lsbsysinit option nor the --regex option is given then the names  must  con‐\nsist  entirely  of  ASCII upper- and lower-case letters, ASCII digits, ASCII underscores, and\nASCII minus-hyphens.\n\nIf the --lsbsysinit option is given, then the names must not end in .dpkg-old  or  .dpkg-dist\nor  .dpkg-new  or  .dpkg-tmp, and must belong to one or more of the following namespaces: the\nLANANA-assigned  namespace  (^[a-z0-9]+$);  the  LSB  hierarchical  and  reserved  namespaces\n(^?([a-z0-9.]+-)+[a-z0-9]+$); and the Debian cron script namespace (^[a-zA-Z0-9-]+$).\n\nIf  the  --regex option is given, the names must match the custom extended regular expression\nspecified as that option's argument.\n\nFiles are run sequentially in the lexical sort order (according to the C/POSIX locale charac‐\nter  collation rules) of their names unless the --reverse option is given, in which case they\nare run in the opposite order.\n\n### OPTIONS\n\n--test print the names of the scripts which would be run, but don't actually run them.\n\n--list print the names of the all matching files (not limited to executables), but don't  ac‐\ntually run them.  This option cannot be used with --test.\n\n#### -v, --verbose\n\nprint the name of each script to stderr before running.\n\n#### --report\n\nsimilar  to  --verbose, but only prints the name of scripts which produce output.  The\nscript's name is printed to whichever of stdout or stderr the  script  first  produces\noutput on.\n\n#### -d, --debug\n\nprint to stderr which scripts get selected for running and which don't.\n\n#### --reverse\n\nreverse the scripts' execution order.\n\n#### --exit-on-error\n\nexit as soon as a script returns with a non-zero exit code.\n\n#### --lsbsysinit\n\nuse LSB namespaces instead of classical behavior.\n\n#### --new-session\n\nrun  each  script in a separate process session.  If you use this option, killing run-\nparts will not kill the currently running script, it will run until completion.\n\n--regex=RE\nvalidate filenames against custom extended regular expression RE.   See  the  EXAMPLES\nsection for an example.\n\n#### -u, --umask=\n\nsets  the umask to umask before running the scripts.  umask should be specified in oc‐\ntal.  By default the umask is set to 022.\n\n#### -a, --arg=\n\npass argument to the scripts.  Use --arg once for each argument you want passed.\n\n--     specifies that this is the end of the options.  Any filename after -- will be  not  be\ninterpreted as an option even if it starts with a hyphen.\n\n#### -h, --help\n\ndisplay usage information and exit.\n\n#### -V, --version\n\ndisplay version and copyright and exit.\n\n### EXAMPLES\n\nPrint the names of all files in /etc that start with `p' and end with `d':\n\nrun-parts --list --regex '^p.*d$' /etc\n\n### COPYRIGHT\n\nCopyright (C) 1994 Ian Jackson.\n\nCopyright (C) 1996 Jeff Noxon.\n\nCopyright (C) 1996, 1997, 1998 Guy Maor\n\nCopyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Clint Adams\n\nrun-parts is free software; see the GNU General Public License version 2 or later for copying\nconditions.  There is no warranty.\n\n\n\nDebian                                       27 Jun 2012                                RUN-PARTS(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "run-parts",
        "section": "8",
        "mode": "man",
        "summary": "run-parts - run scripts or programs in a directory",
        "synopsis": "run-parts    [--test]    [--verbose]   [--debug]   [--report]   [--lsbsysinit]   [--regex=RE]\n[--umask=umask] [--arg=argument] [--exit-on-error] [--help] [--version] [--list]  [--reverse]\n[--] DIRECTORY\nrun-parts -V",
        "flags": [
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "print the name of each script to stderr before running."
            },
            {
                "flag": "",
                "long": "--report",
                "arg": null,
                "description": "similar to --verbose, but only prints the name of scripts which produce output. The script's name is printed to whichever of stdout or stderr the script first produces output on."
            },
            {
                "flag": "-d",
                "long": "--debug",
                "arg": null,
                "description": "print to stderr which scripts get selected for running and which don't."
            },
            {
                "flag": "",
                "long": "--reverse",
                "arg": null,
                "description": "reverse the scripts' execution order."
            },
            {
                "flag": "",
                "long": "--exit-on-error",
                "arg": null,
                "description": "exit as soon as a script returns with a non-zero exit code."
            },
            {
                "flag": "",
                "long": "--lsbsysinit",
                "arg": null,
                "description": "use LSB namespaces instead of classical behavior."
            },
            {
                "flag": "",
                "long": "--new-session",
                "arg": null,
                "description": "run each script in a separate process session. If you use this option, killing run- parts will not kill the currently running script, it will run until completion. --regex=RE validate filenames against custom extended regular expression RE. See the EXAMPLES section for an example."
            },
            {
                "flag": "-u",
                "long": null,
                "arg": null,
                "description": "sets the umask to umask before running the scripts. umask should be specified in oc‐ tal. By default the umask is set to 022."
            },
            {
                "flag": "-a",
                "long": null,
                "arg": null,
                "description": "pass argument to the scripts. Use --arg once for each argument you want passed. -- specifies that this is the end of the options. Any filename after -- will be not be interpreted as an option even if it starts with a hyphen."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "display usage information and exit."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "display version and copyright and exit."
            }
        ],
        "examples": [
            "Print the names of all files in /etc that start with `p' and end with `d':",
            "run-parts --list --regex '^p.*d$' /etc"
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 5,
                "subsections": [
                    {
                        "name": "-v, --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "--report",
                        "lines": 4,
                        "long": "--report"
                    },
                    {
                        "name": "-d, --debug",
                        "lines": 2,
                        "flag": "-d",
                        "long": "--debug"
                    },
                    {
                        "name": "--reverse",
                        "lines": 2,
                        "long": "--reverse"
                    },
                    {
                        "name": "--exit-on-error",
                        "lines": 2,
                        "long": "--exit-on-error"
                    },
                    {
                        "name": "--lsbsysinit",
                        "lines": 2,
                        "long": "--lsbsysinit"
                    },
                    {
                        "name": "--new-session",
                        "lines": 7,
                        "long": "--new-session"
                    },
                    {
                        "name": "-u, --umask=",
                        "lines": 3,
                        "flag": "-u"
                    },
                    {
                        "name": "-a, --arg=",
                        "lines": 5,
                        "flag": "-a"
                    },
                    {
                        "name": "-h, --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V, --version",
                        "lines": 3,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 14,
                "subsections": []
            }
        ]
    }
}