From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16803 invoked from network); 18 Dec 1998 09:43:54 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 18 Dec 1998 09:43:54 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id EAA25969; Fri, 18 Dec 1998 04:39:23 -0500 (EST) Resent-Date: Fri, 18 Dec 1998 04:39:21 -0500 (EST) Message-Id: <9812180922.AA47363@ibmth.df.unipi.it> To: Zsh List Subject: Re: [1997] [Q] A mystery (at least for me ...) In-Reply-To: "Danek Duvall"'s message of "Fri, 18 Dec 1998 01:19:06 NFT." <19981218011906.A6181@lorien.emufarm.ml.org> Date: Fri, 18 Dec 1998 10:22:52 +0100 From: Peter Stephenson Resent-Message-ID: <"v8z0H1.0.HL6.8BYUs"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1999 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Danek Duvall wrote: > On Fri, Dec 18, 1998 at 09:44:54AM +0100, Didier Verna wrote: > > > verna(pts/6) 145 % if echo toto | grep `hostname` ; then echo SUCCESS ; fi > > > SUCCESS > > > > Is it a known bug in this version,or am I missing something ? > > The return value of expression "echo toto | grep `cmd`" is the return value > of cmd, not of grep. [I haven't seen the message this is a reply to here, which is why I'm replying to this one.] This is a bug, it's fixed in 3.1.5. There is a short patch in zsh-workers message 4397, which you can get from http://www.zsh.org/mla/ , and which should apply to most versions of 3.x. You can see the message in http://www.zsh.org/mla/workers//1998/msg00730.html but you may want to find a non-html form if you want to apply it automatically. -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy