{
    "content": [
        {
            "type": "text",
            "text": "# envsubst (man)\n\n## NAME\n\nenvsubst - substitutes environment variables in shell format strings\n\n## SYNOPSIS\n\nenvsubst [OPTION] [SHELL-FORMAT]\n\n## DESCRIPTION\n\nSubstitutes the values of environment variables.\n\n## TLDR\n\n> Substitutes environment variables with their value in shell format strings.\n\n- Replace environment variables in `stdin` and output to `stdout`:\n  `echo '{{$HOME}}' | envsubst`\n- Replace environment variables in an input file and output to `stdout`:\n  `envsubst < {{path/to/input_file}}`\n- Replace environment variables in an input file and output to a file:\n  `envsubst < {{path/to/input_file}} > {{path/to/output_file}}`\n- Replace environment variables in an input file from a space-separated list:\n  `envsubst < {{path/to/input_file}} '{{$USER $SHELL $HOME}}'`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (5 subsections)\n- **AUTHOR**\n- **REPORTING BUGS**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "envsubst",
        "section": "",
        "mode": "man",
        "summary": "envsubst - substitutes environment variables in shell format strings",
        "synopsis": "envsubst [OPTION] [SHELL-FORMAT]",
        "tldr_summary": "Substitutes environment variables with their value in shell format strings.",
        "tldr_examples": [
            {
                "description": "Replace environment variables in `stdin` and output to `stdout`",
                "command": "echo '{{$HOME}}' | envsubst"
            },
            {
                "description": "Replace environment variables in an input file and output to `stdout`",
                "command": "envsubst < {{path/to/input_file}}"
            },
            {
                "description": "Replace environment variables in an input file and output to a file",
                "command": "envsubst < {{path/to/input_file}} > {{path/to/output_file}}"
            },
            {
                "description": "Replace environment variables in an input file from a space-separated list",
                "command": "envsubst < {{path/to/input_file}} '{{$USER $SHELL $HOME}}'"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-v",
                "long": "--variables",
                "arg": null,
                "description": "output the variables occurring in SHELL-FORMAT"
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "display this help and exit"
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "output version information and exit In normal operation mode, standard input is copied to standard output, with references to en‐ vironment variables of the form $VARIABLE or ${VARIABLE} being replaced with the correspond‐ ing values. If a SHELL-FORMAT is given, only those environment variables that are referenced in SHELL-FORMAT are substituted; otherwise all environment variables references occurring in standard input are substituted. When --variables is used, standard input is ignored, and the output consists of the environ‐ ment variables that are referenced in SHELL-FORMAT, one per line."
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": [
                    {
                        "name": "Operation mode:",
                        "lines": 1
                    },
                    {
                        "name": "-v --variables",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--variables"
                    },
                    {
                        "name": "Informative output:",
                        "lines": 1
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V --version",
                        "lines": 11,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 10,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "envsubst - substitutes environment variables in shell format strings\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "envsubst [OPTION] [SHELL-FORMAT]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Substitutes the values of environment variables.\n",
                "subsections": [
                    {
                        "name": "Operation mode:",
                        "content": ""
                    },
                    {
                        "name": "-v --variables",
                        "content": "output the variables occurring in SHELL-FORMAT\n",
                        "flag": "-v",
                        "long": "--variables"
                    },
                    {
                        "name": "Informative output:",
                        "content": ""
                    },
                    {
                        "name": "-h --help",
                        "content": "display this help and exit\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V --version",
                        "content": "output version information and exit\n\nIn normal operation mode, standard input is copied to standard output, with references to en‐\nvironment variables of the form $VARIABLE or ${VARIABLE} being replaced with the  correspond‐\ning values.  If a SHELL-FORMAT is given, only those environment variables that are referenced\nin SHELL-FORMAT are substituted; otherwise all environment variables references occurring  in\nstandard input are substituted.\n\nWhen  --variables is used, standard input is ignored, and the output consists of the environ‐\nment variables that are referenced in SHELL-FORMAT, one per line.\n",
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Written by Bruno Haible.\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "Report bugs in the bug tracker at <https://savannah.gnu.org/projects/gettext> or by email  to\n<bug-gettext@gnu.org>.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright  ©  2003-2020  Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3 or\nlater <https://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.  There is NO WARRANTY,  to\nthe extent permitted by law.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "The  full  documentation for envsubst is maintained as a Texinfo manual.  If the info and en‐‐\nvsubst programs are properly installed at your site, the command\n\ninfo envsubst\n\nshould give you access to the complete manual.\n\n\n\nGNU gettext-runtime 0.21                     March 2022                                  ENVSUBST(1)",
                "subsections": []
            }
        }
    }
}