zsh-workers
 help / color / mirror / code / Atom feed
From: Philippe Troin <phil@fifi.org>
To: Dan Nelson <dnelson@allantgroup.com>
Cc: zsh-workers@sunsite.dk
Subject: Re: local variable assignment and pipelines?
Date: 18 Jul 2003 16:20:49 -0700	[thread overview]
Message-ID: <87vftz1kxa.fsf@ceramic.fifi.org> (raw)
In-Reply-To: <20030718215801.GB37697@dan.emsphone.com>

Dan Nelson <dnelson@allantgroup.com> writes:

> a=1 | echo $a      -> prints "1" on zsh, prints nothing on ash,pdksh,bash

Even more fascinating:

% a=0; b=0; cat < /dev/null | a=1 | b=1 | cat; echo $a $b      
1 1                                         

Reassuring:

% a=0; b=0; cat < /dev/null | {a=1; while read i; do echo $i; done} | b=1 | cat; echo $a $b 
0 1

Phil.


  reply	other threads:[~2003-07-18 23:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-18 21:58 Dan Nelson
2003-07-18 23:20 ` Philippe Troin [this message]
2003-07-21  9:59 ` Peter Stephenson

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=87vftz1kxa.fsf@ceramic.fifi.org \
    --to=phil@fifi.org \
    --cc=dnelson@allantgroup.com \
    --cc=zsh-workers@sunsite.dk \
    /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).