Skip to content

Instantly share code, notes, and snippets.

@gipi
Created June 5, 2012 14:29
Show Gist options
  • Save gipi/2875358 to your computer and use it in GitHub Desktop.
Save gipi/2875358 to your computer and use it in GitHub Desktop.
Restrieve original directory where a script is stored in
# 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