[HPADM] SUMMARY: remsh and return codes

From: Paveza, Gary (gary.paveza_at_AIG.COM)
Date: 11/05/03

  • Next message: Paveza, Gary: "[HPADM] weird remsh/awk behavior"
    To: "'HP9000 Admin'" <hpux-admin@dutchworks.nl>
    Date: Wed, 5 Nov 2003 09:47:13 -0500 
    
    

    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)
    

  • Next message: Paveza, Gary: "[HPADM] weird remsh/awk behavior"