2
 $ CWD=$(cd "$(dirname "$0")" && pwd)

Jan. 22, 2018, 4:55 p.m.dhsrocha

Explanation

Will return excuting script's current working directory, wherever Bash executes the script containing this line.