Skip to content

Instantly share code, notes, and snippets.

@eriknelson
Created February 4, 2017 14:27
Show Gist options
  • Save eriknelson/fc66f92198e16e5b5d30833ec8b18ee2 to your computer and use it in GitHub Desktop.
Save eriknelson/fc66f92198e16e5b5d30833ec8b18ee2 to your computer and use it in GitHub Desktop.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
is a useful one-liner which will give you the full directory name of the script no matter where it is being called from.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment