Remote shell exit status

Remote shell exit status

Post by danub.. » Fri, 04 Jul 1997 04:00:00

When launching a job to another host via remote shell the exit code
returned is that of the success or failure of the rsh (or remsh) launch,
not the program that was run via the remote shell.

Does anybody know some cleaver method to still get the executed
program's exit code nevertheless?  So far I could only think of passing
it back through a file but that does not look very elegant to me.
This must be such a common problem that somebody probably have already
figured out a way.

Thanks for any tips,
Joe Pannon
REMINDER: Please correct my e-mail address in any personal reply by
removing the "gotyou." part from it.  I have altered the address
in the hope of defeating address grabbing SPAM software.  Thanks, JP


1. exit status from remote shell to local shell

     I'm trying to write a shell script that will run a command on one
     of our remote servers and return the exit status of that command
     back to the oringinating server.  I'm using rsh to do remote
     execution of the command on the other server, but I cannot figure
     out how to get the exit status of the command back to my local
     shell. Here is an example of what I've tried:

         (rsh ibm-sales proutil -C BUSY;retval=$?;export $retval)

     Any ideas of how I can do this???



                                      CIS:        72002,1027

2. Incremental tape backup how ?

3. Finding the exit status of a command run on the remote shell

4. Is my tape drive dying?

5. How to get the exit status of a remote command executed via rsh

6. Unix C++ Consultants Needed

7. Exit status of remote commands

8. log file analyzers?

9. ersh - rsh frontend hack returning exit status of remote cmd

10. Retrieving Exit Status of remote command

11. remote command's exit status

12. help: getting remote exit status

13. how to force rsh to exit with status of remote command