Skip to content

Instantly share code, notes, and snippets.

@bryaneaton
Created October 28, 2022 12:51
Show Gist options
  • Save bryaneaton/2429882c4413398b4210f8e740d6bbd4 to your computer and use it in GitHub Desktop.
Save bryaneaton/2429882c4413398b4210f8e740d6bbd4 to your computer and use it in GitHub Desktop.
Template.sh
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
if [[ "${TRACE-0}" == "1" ]]; then
set -o xtrace
fi
if [[ "${1-}" =~ ^-*h(elp)?$ ]]; then
echo 'Usage: ./script.sh arg-one arg-two
This is an awesome bash script to make your life better.
'
exit
fi
cd "$(dirname "$0")"
main() {
echo do awesome stuff
}
main "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment