Skip to content

Instantly share code, notes, and snippets.

@yfix
Forked from gipi/bash_source.sh
Last active August 29, 2015 14:07
Show Gist options
  • Save yfix/be49ad1243045d8c5933 to your computer and use it in GitHub Desktop.
Save yfix/be49ad1243045d8c5933 to your computer and use it in GitHub Desktop.
# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
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