How to find out which shell script called?
Hi,
I have two shell scripts:
sh1.sh
======
echo "First script"
echo "Now calling second one"
sh2.sh
sh2.sh
======
echo "Second script"
In this shell script, I want to print out which shell script called this. In this case, sh1.sh called sh2.sh. So, I want to print out "sh1.sh".
How to achieve?
Thanks,
|