Skip to content

Instantly share code, notes, and snippets.

@AdaFrame
Created September 16, 2014 18:08
Show Gist options
  • Save AdaFrame/d667400014a8260d9272 to your computer and use it in GitHub Desktop.
Save AdaFrame/d667400014a8260d9272 to your computer and use it in GitHub Desktop.
Bash script quick-starter
#!/bin/bash
#CoffeeFrame
#Generates Bash script file, sets permissions and generates boilerplate
#INPUT name of desired script file, similar to touch.
SCRIPT="$1.sh"
CODER=$USER #Default
BOILERPLATE="#!/bin/bash\n#$CODER"
touch $SCRIPT
chmod 700 ./$SCRIPT
printf $BOILERPLATE > ./$SCRIPT
vim ./$SCRIPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment