zsh-users
 help / color / mirror / code / Atom feed
* How to redirect stderr to a pipe and stdout to a file?
@ 2003-06-15 12:50 Haakon Riiser
  2003-06-15 14:04 ` Erik Trulsson
  2003-06-15 16:11 ` Pavol Juhas
  0 siblings, 2 replies; 4+ messages in thread
From: Haakon Riiser @ 2003-06-15 12:50 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-06-15 17:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-15 12:50 How to redirect stderr to a pipe and stdout to a file? Haakon Riiser
2003-06-15 14:04 ` Erik Trulsson
2003-06-15 16:11 ` Pavol Juhas
2003-06-15 17:43   ` Bart Schaefer

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).