{
    "content": [
        {
            "type": "text",
            "text": "# which (man)\n\n## NAME\n\nwhich - locate a command\n\n## SYNOPSIS\n\nwhich [-a] filename ...\n\n## DESCRIPTION\n\nwhich  returns  the  pathnames of the files (or links) which would be executed in the current\nenvironment, had its arguments been given as commands in a strictly  POSIX-conformant  shell.\nIt  does this by searching the PATH for executable files matching the names of the arguments.\nIt does not canonicalize path names.\n\n## TLDR\n\n> Locate a program in the user's `$PATH`.\n\n- Search the `$PATH` environment variable and display the location of any matching executables:\n  `which {{executable}}`\n- If there are multiple executables which match, display all:\n  `which {{-a|--all}} {{executable}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (1 subsections)\n- **EXIT STATUS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "which",
        "section": "",
        "mode": "man",
        "summary": "which - locate a command",
        "synopsis": "which [-a] filename ...",
        "tldr_summary": "Locate a program in the user's `$PATH`.",
        "tldr_examples": [
            {
                "description": "Search the `$PATH` environment variable and display the location of any matching executables",
                "command": "which {{executable}}"
            },
            {
                "description": "If there are multiple executables which match, display all",
                "command": "which {{-a|--all}} {{executable}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-a",
                "long": null,
                "arg": null,
                "description": ""
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-a",
                        "lines": 1,
                        "flag": "-a"
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 9,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "which - locate a command\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "which [-a] filename ...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "which  returns  the  pathnames of the files (or links) which would be executed in the current\nenvironment, had its arguments been given as commands in a strictly  POSIX-conformant  shell.\nIt  does this by searching the PATH for executable files matching the names of the arguments.\nIt does not canonicalize path names.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-a",
                        "content": "",
                        "flag": "-a"
                    }
                ]
            },
            "EXIT STATUS": {
                "content": "0      if all specified commands are found and executable\n\n1      if one or more specified commands is nonexistent or not executable\n\n2      if an invalid option is specified\n\n\n\nDebian                                       29 Jun 2016                                    WHICH(1)",
                "subsections": []
            }
        }
    }
}