Hi,
I have scripts 'a' and 'b' in a directory, say, /home/myhome. Now /home/myhome is not in the $PATH, so i have to invoke the script with the full path. script 'a' calls script 'b'. I can call it as /home/myhome/b inside 'a'. But tomorrow if i move the whole setup to, say, /home/yourhome, i will have to change the script 'a'. Is their any command, system utility or code by which inside 'a' i can know what its parent directory is and then using that parent directory i can invoke script 'b' from inside 'a'.
Hope i have made the question clear. Please let me know if you need further details / clarifications.
Thanks,
Amit.
I have scripts 'a' and 'b' in a directory, say, /home/myhome. Now /home/myhome is not in the $PATH, so i have to invoke the script with the full path. script 'a' calls script 'b'. I can call it as /home/myhome/b inside 'a'. But tomorrow if i move the whole setup to, say, /home/yourhome, i will have to change the script 'a'. Is their any command, system utility or code by which inside 'a' i can know what its parent directory is and then using that parent directory i can invoke script 'b' from inside 'a'.
Hope i have made the question clear. Please let me know if you need further details / clarifications.
Thanks,
Amit.