[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
...Limitation?
From: |
mwoehlke |
Subject: |
...Limitation? |
Date: |
Tue, 26 Sep 2006 10:23:14 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.0 |
Not really a bug, but this seems to be the only bash list gname knows
about, so...
I am trying to figure out how to run a command and pipe the output
through tee, and then check the status of the original command. Normally
I am a very competent shell programmer, but this one has me stumped!
I have tried all of the following with no success (except of course the
last one):
my_false() { false || ret=3; }
ret=0
{ false || exit 1; } | tee none
{ false || ret=2; } | tee none ; [ $ret -eq 0 ] || exit $ret
my_false | tee none ; [ $ret -eq 0 ] || exit $ret
false | tee none || exit 4
false || exit 5
Please, someone tell me I'm just doing it wrong, and this is not a
limititation in bash!
--
Matthew
Download. Untar. Configure. Make. Install. Lather. Rinse. Repeat.
- ...Limitation?,
mwoehlke <=