Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: local variable assignment and pipelines?
- X-seq: zsh-workers 18868
- From: Philippe Troin <phil@xxxxxxxx>
- To: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- Subject: Re: local variable assignment and pipelines?
- Date: 18 Jul 2003 16:20:49 -0700
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <20030718215801.GB37697@xxxxxxxxxxxxxxxx>
- Mail-copies-to: nobody
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20030718215801.GB37697@xxxxxxxxxxxxxxxx>
- Sender: Philippe Troin <phil@xxxxxxxx>
Dan Nelson <dnelson@xxxxxxxxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author