Created
November 26, 2015 20:46
-
-
Save StalkingKillah/ff8c65b7e990df5c46ea to your computer and use it in GitHub Desktop.
Using bash as a template engine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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