Substitutes environment variables with their value in shell format strings.…
Substitutes environment variables with their value in shell format strings. Variables to be replaced should be in either
${var}
or$var
format.
echo '{{$HOME}}' | envsubst
envsubst < {{path/to/input_file}}
envsubst < {{path/to/input_file}} > {{path/to/output_file}}
envsubst '{{$USER $SHELL $HOME}}' < {{path/to/input_file}}