Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Capture Exit Code Using Pipe & Tee

by meonkeys (Chaplain)
on Mar 05, 2009 at 22:57 UTC ( [id://748699]=note: print w/replies, xml ) Need Help??


in reply to Re: Capture Exit Code Using Pipe & Tee
in thread Capture Exit Code Using Pipe & Tee

PIPESTATUS does indeed work when using Bash. Nice trick!
false | tee /dev/null [ $PIPESTATUS -eq 0 ] || exit $PIPESTATUS

---
"A Jedi uses the Force for knowledge and defense, never for attack."

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://748699]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found