Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug report + feature request
- X-seq: zsh-workers 12910
- From: Peter Stephenson <pws@xxxxxxx>
- To: "Sullivan N. Beck" <sbeck@xxxxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: Bug report + feature request
- Date: Thu, 05 Oct 2000 19:32:26 +0100
- In-reply-to: "Your message of Thu, 05 Oct 2000 14:11:21 EDT." <20001005181121.ADB45DCE4@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
> ls -l /tmp/z 3>&1 1>&2 2>&3 | while read line ;do echo ":: "$line; done
>
> total 16
> -rw-r--r-- 1 sbeck apps 396 Oct 5 13:44 foo
> :: total 16
> :: -rw-r--r-- 1 sbeck apps 396 Oct 5 13:44 foo
>
> Notice that in the 3rd section, the output from the command ends up on
> both STDOUT and STDERR. All other shells (ksh, sh, bash) that I tested
> give the correct output for the 3rd case:
>
> total 16
> -rw-r--r-- 1 sbeck apps 396 Oct 5 13:44 foo
That's not a bug, it's due to zsh's `multios' feature, where a repeated
mention of an fd means that it should be used twice: on input this does
cat, and on output it does tee. In this case fd 1 is used for copying to 2
and as a pipe, so stdout goes to both. You need to `setopt nomultios' to
turn this off.
It's about time we had a `no_pipe_multios' option --- this gets so many
people (including me, before now).
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author