Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
How to redirect stderr to a pipe and stdout to a file?
- X-seq: zsh-users 6164
- From: Haakon Riiser <haakon.riiser@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: How to redirect stderr to a pipe and stdout to a file?
- Date: Sun, 15 Jun 2003 14:50:30 +0200
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
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.
I've looked through the chapter on redirection in zshmisc(1),
but I couldn't find an answer. (Of course, that doesn't mean
it's not there. :-)
Thanks in advance for any help.
--
Haakon
Messages sorted by:
Reverse Date,
Date,
Thread,
Author