[HPADM] SUMMARY: remsh and return codes

From: Paveza, Gary (gary.paveza@AIG.COM)
Date: Wed Nov 05 2003 - 09:47:13 EST


Thanks to everyone who replied.

The basic consensus is that you need to either echo the return code as the
last command for remsh and assign it to a variable :

rval=$(remsh "somecommand;echo $?")

Or do some fancy processing where the script being processed creates an
output file that is then scanned.

---------------------------------------------------------
Gary Paveza, Jr.
Senior Systems Administrator -CSA
(302) 252-4831 - phone
(302) 377-1516 - cell

        -----Original Message-----
        From: Paveza, Gary [SMTP:gary.paveza@AIG.COM]
        Sent: Friday, October 31, 2003 9:39 AM
        To: 'HP9000 Admin'
        Subject: [HPADM] remsh and return codes

        Does anyone know of a way to retrieve the return code of a script
run via
        the remsh command?

        What I mean is I'm on hostA and run remsh hostB <somescript> I want
to get
        the return code of somescript, not the remsh command.
        ---------------------------------------------------------
        Gary Paveza, Jr.
        Senior Systems Administrator -CSA
        (302) 252-4831 - phone
        (302) 377-1516 - cell

        --
                     ---> Please post QUESTIONS and SUMMARIES only!! <---
                To subscribe/unsubscribe to this list, contact
majordomo@dutchworks.nl
               Name: hpux-admin@dutchworks.nl Owner:
owner-hpux-admin@dutchworks.nl
         
         Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin (FTP,
browse only)
                    http://www.dutchworks.nl/htbin/hpsysadmin (Web, browse
& search)

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:36 EDT