Created
August 18, 2015 18:44
-
-
Save ntrrgc/80eaf8957aa965be55ee to your computer and use it in GitHub Desktop.
Get the directory where the 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
# http://stackoverflow.com/a/22614738/1777162 | |
SCRIPT=$( readlink -m $( type -p "$0" )) # Full path to script | |
BASE_DIR=`dirname "${SCRIPT}"` # Directory script is run in | |
NAME=`basename "${SCRIPT}"` # Actual name of script even if linked |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment