Skip to content

Instantly share code, notes, and snippets.

@samredai
Last active December 19, 2018 22:41
Show Gist options
  • Save samredai/c659c0c8ebeb2f53ae1dfafac751da8d to your computer and use it in GitHub Desktop.
Save samredai/c659c0c8ebeb2f53ae1dfafac751da8d to your computer and use it in GitHub Desktop.
Linux: Create a file from a template
#!/bin/sh
PNAME=$1
ENDPOINT=$2
GITREPO=$3
#template
cat << EOF
Project name: $PNAME
API Endpoint: $ENDPOINT
Github repo: $GITREPO
EOF
#Example usage:
#./fileMakerTemplate.sh 'Fast & Furious' 'www.stupidplan.com/duh' 'fakehub.com/usdoi' > dumbOperation.txt
#cat dumbOperation.txt
# > Project name: Fast & Furious
# > API Endpoint: www.stupidplan.com/duh
# > Github repo: fakehub.com/usdoi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment