From: Pavol Juhas <juhas@seas.upenn.edu>
To: zsh-users@sunsite.dk
Subject: Re: How to redirect stderr to a pipe and stdout to a file?
Date: Sun, 15 Jun 2003 12:11:41 -0400 [thread overview]
Message-ID: <20030615161141.GA23206@seas.upenn.edu> (raw)
In-Reply-To: <20030615125030.GA4042@s.chello.no>
On Sun, Jun 15, 2003 at 02:50:30PM +0200, Haakon Riiser wrote:
> In bash, I could always do
>
> $ ls INVALID . 2>&1 >/dev/null | less
>
> to send stderr:
>
> ls: INVALID: No such file or directory
> to the less buffer and stdout to /dev/null. When I use the
> same command in zsh 4.0.6, _both_ stderr and stdout is sent
> to less. If I remove "| less" from the command, it works as it
> should: stdout is discarded and stderr is sent to the terminal.
...
You need to
setopt no_multios
and the redirection would work as expected. For explanation
see the MULTIOS section in zshmisc(1).
HTH,
Pavol
next prev parent reply other threads:[~2003-06-15 16:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-15 12:50 Haakon Riiser
2003-06-15 14:04 ` Erik Trulsson
2003-06-15 16:11 ` Pavol Juhas [this message]
2003-06-15 17:43 ` 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=20030615161141.GA23206@seas.upenn.edu \
--to=juhas@seas.upenn.edu \
--cc=zsh-users@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).