Any thoughts on determining the location of a sourced script?
I have a.sh in /usr/home/location1 that calls b.sh in /usr/home/location2.
/usr/home/location1/a.sh
echo $0
. /usr/home/location2/b.sh
/usr/home/location2/b.sh
echo $0
When you run this script the output is:
/usr/home/location1/a.sh
/usr/home/location1/a.sh
Is there another system variable or thought to yield, the location of b.sh?
Thanks
I have a.sh in /usr/home/location1 that calls b.sh in /usr/home/location2.
/usr/home/location1/a.sh
echo $0
. /usr/home/location2/b.sh
/usr/home/location2/b.sh
echo $0
When you run this script the output is:
/usr/home/location1/a.sh
/usr/home/location1/a.sh
Is there another system variable or thought to yield, the location of b.sh?
Thanks