{
    "mode": "man",
    "parameter": "qsgrep",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/qsgrep/1/json",
    "generated": "2026-07-05T11:48:32Z",
    "synopsis": "qsgrep -e <pattern> -o <sub string> [<path>]",
    "sections": {
        "NAME": {
            "content": "qsgrep - prints matching patterns within a file.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "qsgrep -e <pattern> -o <sub string> [<path>]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "qsgrep  is a simple tool to search patterns within files. It uses regular expressions to find\npatterns and prints the submatches within a pre-defined format string.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-e <pattern>",
                    "content": "Specifes the search pattern.\n",
                    "flag": "-e",
                    "arg": "<pattern>"
                },
                {
                    "name": "-o <string>",
                    "content": "Defines the output string where $0-$9 are substituted by the submatches of the regular\nexpression.\n\n<path> Defines  the  input file to process. qsgrep reads from from standard input if this pa‐\nrameter is omitted.\n\n",
                    "flag": "-o",
                    "arg": "<string>"
                }
            ]
        },
        "EXAMPLE": {
            "content": "Shows the IP addresses of clients causing modqos(031) messages):\n\nqsgrep -e 'modqos\\(031\\).*, c=([a-zA-Z0-9:.]*)' -o 'ip=$1' errorlog\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "qsdt(1), qsexec(1),  qsfilter2(1),  qsgeo(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                                     QSGREP(1)",
            "subsections": []
        }
    },
    "summary": "qsgrep - prints matching patterns within a file.",
    "flags": [
        {
            "flag": "-e",
            "long": null,
            "arg": "<pattern>",
            "description": "Specifes the search pattern."
        },
        {
            "flag": "-o",
            "long": null,
            "arg": "<string>",
            "description": "Defines the output string where $0-$9 are substituted by the submatches of the regular expression. <path> Defines the input file to process. qsgrep reads from from standard input if this pa‐ rameter is omitted."
        }
    ],
    "examples": [
        "Shows the IP addresses of clients causing modqos(031) messages):",
        "qsgrep -e 'modqos\\(031\\).*, c=([a-zA-Z0-9:.]*)' -o 'ip=$1' errorlog"
    ],
    "see_also": [
        {
            "name": "qsdt",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qsdt/1/json"
        },
        {
            "name": "qsexec",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/qsexec/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": "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"
        }
    ]
}