Skip to content

Instantly share code, notes, and snippets.

@StalkingKillah
Created November 26, 2015 20:46
Show Gist options
  • Save StalkingKillah/ff8c65b7e990df5c46ea to your computer and use it in GitHub Desktop.
Save StalkingKillah/ff8c65b7e990df5c46ea to your computer and use it in GitHub Desktop.
Using bash as a template engine
#!/usr/bin/env bash
TEMPLATE_FILE=${1}
if [ -z "${TEMPLATE_FILE}" ]; then
echo "Usage: $(basename $0) TEMPLATE_FILE"
exit 1
fi
eval "echo \"$(< $TEMPLATE_FILE)\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment