Skip to content

Instantly share code, notes, and snippets.

@granolocks
Created May 24, 2016 21:18
Show Gist options
  • Select an option

  • Save granolocks/5de06726849225245e7e6fdfce54b49d to your computer and use it in GitHub Desktop.

Select an option

Save granolocks/5de06726849225245e7e6fdfce54b49d to your computer and use it in GitHub Desktop.
write a template from var
outputfile=somecrap.out
echo 'enter your name fool'
read name
cat << _EOF_ > $outputfile
this is my file
blah blah blah
your name is $name
blah blah blah
_EOF_
echo "template written to $outputfile"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment