0

Gets executed script's current working directory

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

— by dhsrocha on Jan. 22, 2018, 4:55 p.m.

Explanation

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