{
    "content": [
        {
            "type": "text",
            "text": "# sg (info)\n\n## NAME\n\nsg - execute command as different group ID\n\n## SYNOPSIS\n\nsg [-] [group [-c ] command]\n\n## DESCRIPTION\n\nThe sg command works similar to newgrp but accepts a command. The\ncommand will be executed with the /bin/sh shell. With most shells you\nmay run sg from, you need to enclose multi-word commands in quotes.\nAnother difference between newgrp and sg is that some shells treat\nnewgrp specially, replacing themselves with a new instance of a shell\nthat newgrp creates. This doesn't happen with sg, so upon exit from a\nsg command you are returned to your previous group ID.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CONFIGURATION**\n- **FILES**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "sg",
        "section": "",
        "mode": "info",
        "summary": "sg - execute command as different group ID",
        "synopsis": "sg [-] [group [-c ] command]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "id",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/id/1/json"
            },
            {
                "name": "login",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/login/1/json"
            },
            {
                "name": "newgrp",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/newgrp/1/json"
            },
            {
                "name": "su",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/su/1/json"
            },
            {
                "name": "gpasswd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/gpasswd/1/json"
            },
            {
                "name": "group",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/group/5/json"
            },
            {
                "name": "gshadow",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/gshadow/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "CONFIGURATION",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "sg - execute command as different group ID\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "sg [-] [group [-c ] command]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The sg command works similar to newgrp but accepts a command. The\ncommand will be executed with the /bin/sh shell. With most shells you\nmay run sg from, you need to enclose multi-word commands in quotes.\nAnother difference between newgrp and sg is that some shells treat\nnewgrp specially, replacing themselves with a new instance of a shell\nthat newgrp creates. This doesn't happen with sg, so upon exit from a\nsg command you are returned to your previous group ID.\n",
                "subsections": []
            },
            "CONFIGURATION": {
                "content": "The following configuration variables in /etc/login.defs change the\nbehavior of this tool:\n\nSYSLOGSGENAB (boolean)\nEnable \"syslog\" logging of sg activity.\n",
                "subsections": []
            },
            "FILES": {
                "content": "/etc/passwd\nUser account information.\n\n/etc/shadow\nSecure user account information.\n\n/etc/group\nGroup account information.\n\n/etc/gshadow\nSecure group account information.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "id(1), login(1), newgrp(1), su(1), gpasswd(1), group(5), gshadow(5).\n\nshadow-utils 4.8.1                02/06/2024                             SG(1)",
                "subsections": []
            }
        }
    }
}