Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] BASH error capture!

Expand Messages
  • Konstantinos Liolios
    You are right. Thanx. Dinos ... ===== Konstantinos Liolios http://www.dinos007.com __________________________________________________ Do you Yahoo!? Yahoo!
    Message 1 of 6 , Jan 29, 2003
      You are right. Thanx.

      Dinos

      --- Carl Flippin <gomez18@...> wrote:
      > I think what you're shooting for then is:
      >
      > # Warning! Untested code ahead:
      >
      > $output = `command 2>&1`; #Run the command and grab
      > the output
      > $return = $? >> 8; #Get the return
      > $core = $? &128; #Check if the program
      > dumped core
      >
      > if($return || $core) {
      > die "This call has failed: $output\n";
      > } else {
      > print "Sweet success!\n";
      > exit;
      > }
      >
      > On Wed, Jan 29, 2003 at 03:07:04PM -0800,
      > Konstantinos Liolios wrote:
      > > Unfortunately the perl script won't die if the
      > command
      > > inside backticks fails, right? And of course I
      > want
      > > the perl script to die and print me the bash error
      > if
      > > something goes wrong.
      > >
      > > Dinos
      > >
      >


      =====
      Konstantinos Liolios
      http://www.dinos007.com

      __________________________________________________
      Do you Yahoo!?
      Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
      http://mailplus.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.