I have a script which sets some environment variable to paths:
export VAR1=/home/xyz/DIR_IN_WHICH_THIS_FILE_EXISTS
export VAR2=$VAR1/abc/qwe
...
Can I use something to get the DIR_IN_WHICH_THIS_FILE_EXISTS
so that if I run this script from anywhere(any path) in the machine, it would set the same values to VAR1
depend on in which directory the script exists?
Please help