Created
August 8, 2014 13:23
-
-
Save codfish/a96b5861aebad8101414 to your computer and use it in GitHub Desktop.
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.
This file contains 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
# 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