Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug report + feature request
- X-seq: zsh-workers 12915
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Bug report + feature request
- Date: Fri, 6 Oct 2000 10:24:27 +0200 (MET DST)
- Cc: sbeck@xxxxxxxxxxxx
- In-reply-to: "Sullivan N. Beck"'s message of Thu, 05 Oct 2000 14:11:21 -0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Sullivan N. Beck wrote:
> ...
>
> Now for the feature request. Since I'd actually like to separate and
> pipe STDOUT and STDERR separately to different commands (all of the
> above came about from various attempts to get this working) without
> resorting to fifos, intermediate files, etc., what I'd _really_ like to
> do is to be able to pipe different file descriptors similar to how I can
> redirect them to a file. For example, I'd like to replace the following
> lines:
>
> COMMAND > /tmp/stdout 2> /tmp/stderr
> cat /tmp/stderr | STDERR_COMMAND
> cat /tmp/stdout | STDOUT_COMMAND
>
> with the single line:
>
> COMMAND >| STDOUT_COMMAND 2>| STDERR_COMMAND
>
> If this syntax isn't acceptable, that's fine with me. Any syntax is
> fine. I'd just like the functionality.
How should it find out if, in your example, STDERR_COMMAND should be
used for COMMAND or STDOUT_COMMAND?
But anyway... have you seen the >>(cmd) process substitution?
You can do:
COMMAND >>(STDOUT_COMMAND) 2>>(STDERR_COMMAND)
or
COMAMND 2>>(STDERR_COMMAND) | STDOUT_COMMAND
if you prefer.
Note to workers: in the info file, >>(foo) is shown as `> >(foo)'. Urgh.
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author