envsubst
all
Substitutes environment variables with their value in shell format strings. Variables to be replaced should be in either `${var}` or `$var` format.
More info →Examples (4)
Replace environment variables in an input file and output to `stdout`
envsubst < path/to/input_fileReplace environment variables in an input file and output to a file
envsubst < path/to/input_file > path/to/output_fileReplace environment variables in an input file from a space-separated list
envsubst < path/to/input_file '$USER $SHELL $HOME'made by @shridhargupta | data from tldr-pages