Bash Templating: How to build configuration files from templates with Bash? June 23, 2022 by Tarik Try envsubst FOO=foo BAR=bar export FOO BAR envsubst <<EOF FOO is $FOO BAR is $BAR EOF