present working directory in shell script
#!/bin/bash echo "Script executed from: ${PWD}" BASEDIR=$(dirname $0) echo "Script location: ${BASEDIR}"
Source: stackoverflow.com
present working directory in linux
pwd #use this command in linux shell to see the present working directory