I have already gone through this topic on this forum, but still i am getting same problem.
I am using solaris 10. my login shell is /usr/bash
i have got a script as below
Reason for asking: if you run a script using an explicit interpreter ('sh' in your example), you tell the system to ignore the interpreter specified in the shebang line. If your local sh isn't compatible with the Korn Shell, it won't know what to do with that line.
/home/gyan> type sh
sh is hashed (/usr/bin/sh)
/home/gyan> which sh
/usr/bin/sh
So basically, if we are using shell command interpreter in scripts then shouldn't run the script with any shell. Should simple run by typing name of script?