Get current directory of script file in shell script
By Tech Writer
•
•
1 min read
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"&& pwd )
Creds: http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in