Created
January 19, 2018 06:33
-
-
Save goddoe/de2dfd7ac26b6d4e74bd39c928fc73b8 to your computer and use it in GitHub Desktop.
get absolute path of current running shell 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
# reference : https://stackoverflow.com/questions/4774054/reliable-way-for-a-bash-script-to-get-the-full-path-to-itself | |
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" | |
echo $SCRIPTPATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment