zsh-users
 help / color / mirror / code / Atom feed
From: Haakon Riiser <haakon.riiser@fys.uio.no>
To: zsh-users@sunsite.dk
Subject: How to redirect stderr to a pipe and stdout to a file?
Date: Sun, 15 Jun 2003 14:50:30 +0200	[thread overview]
Message-ID: <20030615125030.GA4042@s.chello.no> (raw)

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


             reply	other threads:[~2003-06-15 12:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-15 12:50 Haakon Riiser [this message]
2003-06-15 14:04 ` Erik Trulsson
2003-06-15 16:11 ` Pavol Juhas
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=20030615125030.GA4042@s.chello.no \
    --to=haakon.riiser@fys.uio.no \
    --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).