Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: pipes and redirection
- X-seq: zsh-users 477
- From: Peter Stephenson <pws@xxxxxx>
- To: gsker@xxxxxxxxxxxxxxxxx, zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: pipes and redirection
- Date: Wed, 30 Oct 1996 10:07:56 +0100
- In-reply-to: "Gerald Skerbitz"'s message of "Tue, 29 Oct 1996 13:22:23 MET." <Pine.SOL.3.95.961029130246.11799A-100000@xxxxxxxxxxxxxxxxxxx>
Gerald Skerbitz wrote:
> (print -u2 This is stderr;print This is stdout) 2>&1 1>test | less
>
> which brought up less, with _both_ strings displayed.
> So, clearly, the | is picking up both streams.
>
> Is there a way to cleanly do what I want it to do?
The correct answer, if you have a recent version of zsh, is
to `setopt nomultios' before trying the above. Zsh's multio feature
is redirecting stdout both to test and to the pipe. It's a little
counterintuitive here, as has been pointed out before. The option
appeared some time mid 2.6beta.
--
Peter Stephenson <pws@xxxxxx> Tel: +49 33762 77366
WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77413
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author