I'm using remote shell (rsh) to call a script on a remote computer. I'm checking error codes of the rsh command and the code that returns the remote computer:
Is the variable $DAN defined where it is being passed to the script as a parameter? If it isn't and it will be defined on the remote system when the script executed, then just escape the $ to prevent the $DAN from being substituted with its value.
The substitution of $DAN is not made by the current shell because the command is specified betwen simple quotes. It's the remote shell that make the substitution of the DAN variable that may be not define.
Change simple quotes by double quote and protec the substitution of ?
Jean-Pierre.
Thanks for the post! I tried your suggestion, but the variable stat doesn't store the proper exit code from the script. If the script ProIV.sh on the remote side exits with code 1, the variable stat shuld have this return code but it has allways 0.
I just used brackeds: "(" and ")" and now the script is executed with argument read from the variable DAN and I get the return code of the script either.