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

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

Post by The Du » Sun, 17 Oct 1993 04:44:58



Here's an easy one for all you unix experts:

I'm trying to get the exit status of a command executed thru rsh

It is part of a csh script and looks something like this

        rsh -n <hostname> <command>
        if($status) then
                echo "Error"
        endif

When <command> has an error condition, rsh still exits with an error status of
'0' because rsh was successful even though <command> wasnt.

How could I get around this?

I dont have access to usenet, so I'd appreciate direct replies to
my email address

Thanks in advance,
Sabitha.

--

 
 
 

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

Post by Wolfgang Sander-Beuerma » Mon, 18 Oct 1993 07:18:16



> Here's an easy one for all you unix experts:
> I'm trying to get the exit status of a command executed thru rsh

[...]

Just read the Unix.faq:
"3.11) How do I check the exit status of a remote command
       executed via "rsh" ?"



 
 
 

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

Dear Fellow Netlanders,

Reading the manual pages concerned with rsh and experimentation thus
far fail to show how rsh can be made to exit with the status of the command
it is executing on a remote host (if indeed this is possible...).
The rsh always seems to exit with a status of 0, even if the command on the
remote hosts fails.

Thanks in advance for any pointers/solutions.

Cheerio, Rick Rodgers
R. P. C. Rodgers, M.D.         (415)476-2957 (work) 664-0560 (home)
UCSF Laurel Heights Campus     UUCP: ...ucbvax.berkeley.edu!cca.ucsf.edu!rodgers


2. SuSE Linux 5.3 Proxy Server ?

3. Getting exit status for a command completed by rsh.

4. Redial on Modem Hangup

5. exit code of the remote command execution (done via rsh)

6. Linksys EPSX3 3 Port printserver

7. rsh - getting the status of an rsh'd command

8. Using Apache-Proxy-Cache offline (1.2b4)

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

10. Exit status of remotely executed command

11. getting exit status of called program via system

12. help: getting remote exit status

13. Exit status of remote commands