Description
Replaces variables in a file with values based on your current shell env
. This is useful to create config files from templates, for example.
If the file contains placeholders that are not defined in the environment, they will become empty strings (“”). The original file is overwritten with the modified file.
Usage
replace_envs <filename1> <filename2> <filenameN>
where your files have placeholders in the format $ENVIRONMENT_VARIABLE_NAME
or ${ENVIRONMENT_VARIABLE_NAME}
.