Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get the directory in bash of the script that's running. It's a useful one-liner which will give you the full directory name of the script no matter where it is being called from.
# source: http://stackoverflow.com/a/246128
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.