Last active
January 23, 2016 07:52
-
-
Save commenthol/3d0fc84daaa361f1cb5e to your computer and use it in GitHub Desktop.
get current working dir of running 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
CWD=$(cd -P -- "$(dirname -- "$0")" && pwd -P) | |
echo $CWD | |
echo ${CWD##*/} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment