{
    "content": [
        {
            "type": "text",
            "text": "# select (perldoc)\n\n## TLDR\n\n> Bash builtin construct for creating menus.\n\n- Create a menu out of individual words:\n  `select {{word}} in {{apple orange pear banana}}; do echo ${{word}}; done`\n- Create a menu from the output of another command:\n  `select {{line}} in $({{command}}); do echo ${{line}}; done`\n- Specify the prompt string for `select` and create a menu for picking a file or folder from the current directory:\n  `PS3=\"{{Select a file: }}\"; select {{file}} in *; do echo ${{file}}; done`\n- Create a menu from a Bash array:\n  `{{fruits}}=({{apple orange pear banana}}); select {{word}} in ${{{fruits[@}}}; do echo ${{word}}; done`\n\n*Source: tldr-pages*\n\n---\n\n## Full Content\n\n"
        }
    ],
    "structuredContent": {
        "command": "select",
        "section": "-f",
        "mode": "perldoc",
        "summary": null,
        "synopsis": null,
        "tldr_summary": "Bash builtin construct for creating menus.",
        "tldr_examples": [
            {
                "description": "Create a menu out of individual words",
                "command": "select {{word}} in {{apple orange pear banana}}; do echo ${{word}}; done"
            },
            {
                "description": "Create a menu from the output of another command",
                "command": "select {{line}} in $({{command}}); do echo ${{line}}; done"
            },
            {
                "description": "Specify the prompt string for `select` and create a menu for picking a file or folder from the current directory",
                "command": "PS3=\"{{Select a file: }}\"; select {{file}} in *; do echo ${{file}}; done"
            },
            {
                "description": "Create a menu from a Bash array",
                "command": "{{fruits}}=({{apple orange pear banana}}); select {{word}} in ${{{fruits[@}}}; do echo ${{word}}; done"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [],
        "sections": []
    }
}