From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28510 invoked from network); 3 May 1998 06:19:50 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 3 May 1998 06:19:50 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id CAA07266; Sun, 3 May 1998 02:16:28 -0400 (EDT) Resent-Date: Sun, 3 May 1998 02:16:16 -0400 (EDT) Message-ID: <19980503021749.21621@astaroth.nit.gwu.edu> Date: Sun, 3 May 1998 02:17:49 -0400 From: Sweth Chandramouli To: zsh-users@math.gatech.edu Subject: Re: Re: exit value of intermediate program in pipe Mail-Followup-To: zsh-users@math.gatech.edu References: <199805022224.QAA03113@ipecac.Central.Sun.COM> <980502190831.ZM29269@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89 In-Reply-To: <980502190831.ZM29269@candle.brasslantern.com> Resent-Message-ID: <"I3cmT2.0.um1.lk0Jr"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1501 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Sat, May 02, 1998 at 07:08:31PM -0700, Bart Schaefer wrote: > You can do this: > > foo() { > /bin/blah >>(grep -v "foo") > } > > That effectively runs grep in the background and blah in the foreground, > while still connecting them with a pipe. Then you get the exit status of > blah, but with the side effect that the function returns as soon as blah > finishes, without waiting for the grep -- which may not be what you want. isn't this what wait was designed for? foo () { /bin/blah >>(grep -v "foo") wait } what exactly is the syntax that >> uses to become a pipe rather than a redirection to a file? the way you describe it looks a lot like a ksh two-way pipe, only cleaner; as i mentioned in my other reply to this thread, i've never been able to get |& to work, so any alternative would be welcome. -- sweth. -- "Countin' on a remedy I've counted on before Goin' with a cure that's never failed me What you call the disease I call the remedy" -- The Mighty Mighty Bosstones