I am not able to figure out why this is happening, could you all please help me. What changes should i make in the command so that it will return me the same output as it is giving in unix enviornment i.e .
---------- Post updated at 07:09 AM ---------- Previous update was at 06:45 AM ----------
I read on the whence command one point i would like to share is it detects it detects commands and aliases, and searches your path.
So my script path is searched properly in unix env... whereas this is not happening in the linux enviornment.
Could you all please help me in modifying the command so that i get the exact path of my script.
---------- Post updated at 11:35 PM ---------- Previous update was at 07:09 AM ----------
HI
To get the path in linux i tried
scrname={PWD}/$0
Where $0 will be script name.
My question is if i am using PWD instaed of whence in linux what difference it can cause to my script.
'unix env' does not mean very much. Which OSs are you actually talking about?
whence is most likely returning nothing because the directory containing the script is not in $PATH - which is nothing to do with differences in the OS, you just have them set up differently.
Whether ${PWD} will work depends on how and where the script is being run.