Skip to content

Instantly share code, notes, and snippets.

@dragolabs
Created July 2, 2014 15:28
Show Gist options
  • Save dragolabs/b7ce939a182f5114ad4a to your computer and use it in GitHub Desktop.
Save dragolabs/b7ce939a182f5114ad4a to your computer and use it in GitHub Desktop.
Example head of bash script
#!/usr/bin/env bash
set -o pipefail
set -o errexit
# set -o xtrace
__DIR__="$(cd "$(dirname "${0}")"; echo $(pwd))"
__BASE__="$(basename "${0}")"
__FILE__="${__DIR__}/${__BASE__}"
ARG1="${1:-Undefined}"
# set -o nounset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment