Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to redirect stderr to a pipe and stdout to a file?
- X-seq: zsh-users 6166
- From: Pavol Juhas <juhas@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: How to redirect stderr to a pipe and stdout to a file?
- Date: Sun, 15 Jun 2003 12:11:41 -0400
- In-reply-to: <20030615125030.GA4042@xxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20030615125030.GA4042@xxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author