首页
首页 » 其它 » envsubst

envsubst


envsubst

envsubst [options] [shell-format]

Substitutes environment variables in a shell string or script. When used with no options, copies stdin to stdout, replacing any environment variable string, such as $VARIABLE or ${VARIABLE}, with the appropriate environment variable value. So, "My editor is $EDITOR" would be converted to "My editor is /usr/bin/emacs." Specifying a shell format limits the substitutions to those variables referenced in the shell format.

Options

-h,--help

Print help message and then exit.

-V,--version

Print version information and then exit.

-v,--variables

Display the variables referenced in the shell format, and then exit.