Re: graceful script exit

From: Bill Verzal (BVerzal_at_KOMATSUNA.COM)
Date: 04/23/04

  • Next message: Taylor, David: "Re: graceful script exit"
    Date:         Fri, 23 Apr 2004 11:17:27 -0500
    To: aix-l@Princeton.EDU
    
    

    Create a subroutine to check $? after each command.

    BV
    --------------------------------------------------------

    "If everything is coming your way, then you are in the wrong lane"

    Bill Verzal
    AIX Administrator, Komatsu America
    (847) 970-3726 - direct
    (847) 970-4184 - fax

                 Bob.Kelley@BRINKS
                 INC.COM
                 Sent by: IBM AIX To
                 Discussion List aix-l@Princeton.EDU
                 <aix-l@Princeton. cc
                 EDU>
                                                                       Subject
                                           graceful script exit
                 04/23/2004 11:02
                 AM

                 Please respond to
                      IBM AIX
                  Discussion List
                 <aix-l@Princeton.
                       EDU>

    If I have a script with does a number of things like tars, copy commands,
    etc. What is the best way to generate a flag if a SINGLE command in the
    script fails? In other words, if I'm thinking about this correctly, I want
    to get a page when the script is finished, and one command didn't finish
    correctly, even if some of the commands have succeeded. Thanks!

    Bobby Kelley Jr.
    972-877-5341


  • Next message: Taylor, David: "Re: graceful script exit"

    Relevant Pages

    • Re: graceful script exit
      ... okay, so some of that syntax won't exactly work, but from the top of my ... What is the best way to generate a flag if a SINGLE command in the ...
      (AIX-L)
    • Re: AIX 5.2 L and Oracle 8.1.7 32bits
      ... AIX Administrator, Komatsu America ... executing the command: ... Oracle, but if anybody in the list have the same environment and got the ...
      (AIX-L)
    • Re: cat /dev/urandom
      ... `cat /dev/urandom` will do just that... ... but what if the command was: ... To unsubscribe, ...
      (freebsd-questions)
    • Re: cat /dev/urandom
      ... Lane writes: ... but what if the command was: ... It also might produce "Hamlet". ... To unsubscribe, ...
      (freebsd-questions)