Created
July 4, 2012 02:31
-
-
Save remino/3044861 to your computer and use it in GitHub Desktop.
Get directory in which script resides
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Works in Bash. Should readlink also be used?