Getting the exit status of a remote command

Hi to everyone.

How can I get the exit status from a remote command executed with rexec? :eek:

machine A has RedHat Linux 9 and the remote machine B has SCO UNIX.

Code:

rexec -l user -p password host sh /u/files/scripts/seq_cal.sh 2006 08

I want the exit status returned by seq_cal.sh not the one returned by rexec. It always return 0, that means its execution was okay.

Thanks

I'm not familar with rexec but if you need to do this you could try a wrapper script that reports the exit status as text, ie. start the wrapper script remotely and have that start the proper script and pickup the exit status for you. Obviously this wouldn't give you the exit status of the wrapper script but if it's simple enough you could assume it works fine or if it reports no exit status then assume it's failed.