zsh-users
 help / color / mirror / code / Atom feed
From: Danek Duvall <duvall@emufarm.ml.org>
To: Zsh List <zsh-users@math.gatech.edu>
Subject: Re: [1997] [Q] A mystery (at least for me ...)
Date: Fri, 18 Dec 1998 01:19:06 -0800	[thread overview]
Message-ID: <19981218011906.A6181@lorien.emufarm.ml.org> (raw)
In-Reply-To: <qyjhfutdek9.fsf@metheny.enst.fr>; from Didier Verna on Fri, Dec 18, 1998 at 09:44:54AM +0100

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


  reply	other threads:[~1998-12-18  9:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-18  8:44 Didier Verna
1998-12-18  9:19 ` Danek Duvall [this message]
1998-12-18  9:22   ` [1997] " Peter Stephenson
1998-12-18  9:54 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19981218011906.A6181@lorien.emufarm.ml.org \
    --to=duvall@emufarm.ml.org \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).