Re: ksh script, exit status and pipe

From: Stephane CHAZELAS (this.address_at_is.invalid)
Date: 08/25/04

  • Next message: Patrick Beckhelm: "Getting Veritas license information"
    Date: 25 Aug 2004 12:49:53 GMT
    
    

    2004-08-25, 11:00(+00), Ian Wilson:
    > I want to execute a command, redirect stderr and tee stdout
    > e.g.
    > tar ... 2>foo.err | tee foo.log
    >
    > however I also want to capture the exit status of the first command
    [...]

    See question 13 of the comp.unix.shell FAQ:

    http://home.comcast.net/~j.p.h/cus-faq.html#M

    -- 
    Stephane
    

  • Next message: Patrick Beckhelm: "Getting Veritas license information"

    Relevant Pages

    • ksh script, exit status and pipe
      ... I want to execute a command, redirect stderr and tee stdout ... however I also want to capture the exit status of the first command ...
      (comp.unix.admin)
    • Re: exit status
      ... command is NULL then that NULL output / ... exit 1; ... you capture it with back-ticks: ...
      (perl.beginners)
    • Re: Using the script command
      ... > I want to use the script command within a shell script to capture the ... > file but I would prefer to use the script command. ... I tried using exit, ... > of the shell script not the command script. ...
      (comp.unix.shell)
    • Re: dd command & reading in background
      ... ^ D,"UnixReview: Shell Corner: The dspl Korn Shell ... user input timeout, do a search on C.U.S. for the ... # 0<c<127 - job exited with this exit code ...
      (comp.unix.shell)
    • Re: Most dependable way to run system commands
      ... Eventually I'd like to bring the execution of a few system commands ... specific execution issue (it dealt more with executing Perl code)). ... Unix and many similar systems, the exit status is an integer, with 0 ... variable after running a command via system or backticks. ...
      (perl.beginners)