{
    "content": [
        {
            "type": "text",
            "text": "# qsexec (man)\n\n## NAME\n\nqsexec  -  parses  the  data received via stdin and executes the defined command on a pattern match.\n\n## SYNOPSIS\n\nqsexec -e <pattern> [-t <number>:<sec>] [-c <pattern> [<command string>]]  [-p]  [-u  <user>]\n<command string>\n\n## DESCRIPTION\n\nqsexec  reads  log lines from stdin and searches for the defined pattern. It executes the de‐\nfined command string on pattern match.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (2 subsections)\n- **EXAMPLE**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "qsexec",
        "section": "",
        "mode": "man",
        "summary": "qsexec  -  parses  the  data received via stdin and executes the defined command on a pattern match.",
        "synopsis": "qsexec -e <pattern> [-t <number>:<sec>] [-c <pattern> [<command string>]]  [-p]  [-u  <user>]\n<command string>",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-e",
                "long": null,
                "arg": "<pattern>",
                "description": "Specifes the search pattern causing an event which shall trigger the command. -t <number>:<sec> Defines the number of pattern match within the the defined number of seconds in order to trigger the command execution. By default, every pattern match causes a command ex‐ ecution. -c <pattern> [<command string>] Pattern which clears the event counter. Executes optionally a command if an event com‐ mand has been executed before. -p Writes data also to stdout (for piped logging)."
            },
            {
                "flag": "-u",
                "long": null,
                "arg": "<name>",
                "description": "Become another user, e.g. www-data. <command string> Defines the event command string where $0-$9 are substituted by the submatches of the regular expression."
            }
        ],
        "examples": [
            "Executes the deny.sh script providing the IP address of the  client  causing  a  modqos(031)",
            "messages whenever the log message appears 10 times within at most one minute:",
            "ErrorLog  \"|/usr/bin/qsexec -e \\'modqos\\(031\\).*, c=([0-9a-zA-Z:.]*)\\' -t 10:60 \\'/usr/lo‐",
            "cal/bin/deny.sh $1\\'\""
        ],
        "see_also": [
            {
                "name": "qsdt",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qsdt/1/json"
            },
            {
                "name": "qsfilter2",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qsfilter2/1/json"
            },
            {
                "name": "qsgeo",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qsgeo/1/json"
            },
            {
                "name": "qsgrep",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qsgrep/1/json"
            },
            {
                "name": "qshead",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qshead/1/json"
            },
            {
                "name": "qslog",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qslog/1/json"
            },
            {
                "name": "qslogger",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qslogger/1/json"
            },
            {
                "name": "qspng",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qspng/1/json"
            },
            {
                "name": "qsre",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qsre/1/json"
            },
            {
                "name": "qsrespeed",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qsrespeed/1/json"
            },
            {
                "name": "qsrotate",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qsrotate/1/json"
            },
            {
                "name": "qssign",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qssign/1/json"
            },
            {
                "name": "qstail",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qstail/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-e <pattern>",
                        "lines": 13,
                        "flag": "-e",
                        "arg": "<pattern>"
                    },
                    {
                        "name": "-u <name>",
                        "lines": 6,
                        "flag": "-u",
                        "arg": "<name>"
                    }
                ]
            },
            {
                "name": "EXAMPLE",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "qsexec  -  parses  the  data received via stdin and executes the defined command on a pattern\nmatch.\n\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "qsexec -e <pattern> [-t <number>:<sec>] [-c <pattern> [<command string>]]  [-p]  [-u  <user>]\n<command string>\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "qsexec  reads  log lines from stdin and searches for the defined pattern. It executes the de‐\nfined command string on pattern match.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-e <pattern>",
                        "content": "Specifes the search pattern causing an event which shall trigger the command.\n\n-t <number>:<sec>\nDefines the number of pattern match within the the defined number of seconds in  order\nto trigger the command execution. By default, every pattern match causes a command ex‐\necution.\n\n-c <pattern> [<command string>]\nPattern which clears the event counter. Executes optionally a command if an event com‐\nmand has been executed before.\n\n-p     Writes data also to stdout (for piped logging).\n",
                        "flag": "-e",
                        "arg": "<pattern>"
                    },
                    {
                        "name": "-u <name>",
                        "content": "Become another user, e.g. www-data.\n\n<command string>\nDefines  the event command string where $0-$9 are substituted by the submatches of the\nregular expression.\n",
                        "flag": "-u",
                        "arg": "<name>"
                    }
                ]
            },
            "EXAMPLE": {
                "content": "Executes the deny.sh script providing the IP address of the  client  causing  a  modqos(031)\nmessages whenever the log message appears 10 times within at most one minute:\nErrorLog  \"|/usr/bin/qsexec -e \\'modqos\\(031\\).*, c=([0-9a-zA-Z:.]*)\\' -t 10:60 \\'/usr/lo‐\ncal/bin/deny.sh $1\\'\"\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "qsdt(1), qsfilter2(1),  qsgeo(1),  qsgrep(1),  qshead(1),  qslog(1),  qslogger(1),  qspng(1),\nqsre(1), qsrespeed(1), qsrotate(1), qssign(1), qstail(1)\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Pascal Buchbinder, http://mod-qos.sourceforge.net/\n\n\n\nmodqos utilities 11.63                       May 2019                                     QSEXEC(1)",
                "subsections": []
            }
        }
    }
}