rsh and exit codes

From: Browett, Darren <dbrowett_at_coquitlam.ca>
Date: Thu, 22 Apr 2004 15:30:13 -0700

Hi Managers

I have a small script, exit_code.sh that has a "exit 1" in it.
If I run the command locally then do a echo $? I receive 1 (one) as the
answer.

But if I run it through rsh, then answer to echo $? is always zero.
(see script below)

Is that the expected behaviour ?

if it is, does anybody know of a way I can capture the exit code of a
remotely executed script.

Thanks

Darren

This is Tru64 5.1b, patch kit 3.

script to test exit code :

#!/bin/sh

for iHOST in trac1 trac2 ; do

rsh $iHOST "/ora/dba/sbin/exit_code.sh ; echo $?"

done
Received on Thu Apr 22 2004 - 22:31:58 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:44 NZDT