I have script suppose env.csh . I can source it from any where irrespective of its location
File Path : /tmp/dump/env.csh
Run Path : /usr
Command : source /tmp/dump/env.csh
How to get file path when I am sourcing env.csh from / folder usr .
I used this script
set SCRIPT=`readlink -f "$0"`
set SCRIPTPATH=`dirname "$SCRIPT"`
echo $SCRIPTPATH
But It is gives path as /usr
Any way to get file path