Created
January 21, 2017 16:43
-
-
Save jmewes/e3a5887abffeb1746e4caf2d4832830d to your computer and use it in GitHub Desktop.
Get script directory in a Bash script
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
SCRIPT_DIR=$(dirname "$0") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within?page=1&tab=votes#tab-top