Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [1997] [Q] A mystery (at least for me ...)
- X-seq: zsh-users 1998
- From: Danek Duvall <duvall@xxxxxxxxxxxxxx>
- To: Zsh List <zsh-users@xxxxxxxxxxxxxxx>
- Subject: Re: [1997] [Q] A mystery (at least for me ...)
- Date: Fri, 18 Dec 1998 01:19:06 -0800
- In-reply-to: <qyjhfutdek9.fsf@xxxxxxxxxxxxxxx>; from Didier Verna on Fri, Dec 18, 1998 at 09:44:54AM +0100
- Mail-followup-to: Zsh List <zsh-users@xxxxxxxxxxxxxxx>
- References: <qyjhfutdek9.fsf@xxxxxxxxxxxxxxx>
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 following commands might explain ...
if echo toto | grep x`false`; then echo SUCCESS; fi
if echo toto | grep x`true`; then echo SUCCESS; fi
The return value of expression "echo toto | grep `cmd`" is the return value
of cmd, not of grep.
I'm not sure how clearly this is documented in the manpage. At this point,
I've gotten used to the fact that processes act weirdly around pipes, and
I've learned to work around it.
However, documentation on exactly what is expected might be nice. I
couldn't find it in the section on process substitution or in the section
on pipelines. Is it somewhere else?
Danek
Messages sorted by:
Reverse Date,
Date,
Thread,
Author