Skip to content

Instantly share code, notes, and snippets.

@yudenzel
Last active December 24, 2019 09:16
Show Gist options
  • Save yudenzel/007c51dcd2db5e436610c9f5385f3ff7 to your computer and use it in GitHub Desktop.
Save yudenzel/007c51dcd2db5e436610c9f5385f3ff7 to your computer and use it in GitHub Desktop.
Generate file from template file via substitution bash variables
function subst-template () {
(echo "cat << EOF"; cat "${1}"; echo "EOF") | bash
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment