Hello,
I've a script that is launched with a soft link. Inside the script, I need to know where is the script, and I'm using the following :
SH_DIR = $(cd $(dirname "$0"); pwd)
But SH_DIR contains the path of the soft link
i.e, I've the soft link like this :
Deb:~# ls -l /etc/rc2.d/
lrwxrwxrwx 1 root root 27 2002-01-01 01:03 S99launch -> /usr/local/soft/bin/doit.sh
Inside doit.sh, SH_DIR contains /etc/rc2.d/ but I need /usr/local/soft/bin
Any ideas?
thanks!