From: Peter Stephenson <pws@csr.com>
To: "Sullivan N. Beck" <sbeck@cise.ufl.edu>,
zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: Bug report + feature request
Date: Thu, 05 Oct 2000 19:32:26 +0100 [thread overview]
Message-ID: <0G1Y00JMAZI1EJ@la-la.cambridgesiliconradio.com> (raw)
In-Reply-To: "Your message of Thu, 05 Oct 2000 14:11:21 EDT." <20001005181121.ADB45DCE4@mail.cise.ufl.edu>
> 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@csr.com> Software Engineer
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
next prev parent reply other threads:[~2000-10-05 18:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-05 18:11 Sullivan N. Beck
2000-10-05 18:32 ` Peter Stephenson [this message]
2000-10-06 8:24 Sven Wischnowsky
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=0G1Y00JMAZI1EJ@la-la.cambridgesiliconradio.com \
--to=pws@csr.com \
--cc=sbeck@cise.ufl.edu \
--cc=zsh-workers@sunsite.auc.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).