Assign the current work directory to the bash script variable 'CWD'. CWD=$(pwd) # Print it. printf "%s\n" ...
stackoverflow.com