Skip to content

Instantly share code, notes, and snippets.

@remino
Created July 4, 2012 02:31
Show Gist options
  • Save remino/3044861 to your computer and use it in GitHub Desktop.
Save remino/3044861 to your computer and use it in GitHub Desktop.
Get directory in which script resides
DIR="$( cd "$( dirname "$BASH_SOURCE[0]" )" && pwd )"
@remino
Copy link
Author

remino commented Jul 4, 2012

Works in Bash. Should readlink also be used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment