Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: how to pipe to stdout and stderr
- X-seq: zsh-users 6920
- From: Hisham Muhammad <hisham@xxxxxxxxxx>
- To: Andy Spiegl <zsh.Andy@xxxxxxxxx>, ZSH User List <zsh-users@xxxxxxxxxx>
- Subject: Re: how to pipe to stdout and stderr
- Date: Thu, 18 Dec 2003 00:17:44 -0200
- In-reply-to: <20031218020123.GA7059@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20031218001201.GA27866@xxxxxxxxx> <1071711880.5099.9.camel@umarumohammed> <20031218020123.GA7059@xxxxxxxxx>
On Thursday 18 December 2003 00:01, Andy Spiegl wrote:
> > <ibraheem@umarumohammed:~/try> ls foo bar > stdout 2> stderr
>
> Thanks, but I don't want to redirect to 2 files, but pipe to 2 programs.
Use mkfifo, maybe?
hisham@aria ~/test] mkfifo err
hisham@aria ~/test] mkfifo out
hisham@aria ~/test] cat out | tac > out.txt &
hisham@aria ~/test] cat err | tr '[:lower:]' '[:upper:]' > err.txt &
hisham@aria ~/test] ls * zzz > out 2> err
hisham@aria ~/test]cat err.txt
LS: ZZZ: NO SUCH FILE OR DIRECTORY
hisham@aria ~/test] ls -1
err
err.txt
out
out.txt
hisham@aria ~/test] cat out.txt
out.txt
out
err.txt
err
--
Hisham Muhammad
"...and this is the first step."
Messages sorted by:
Reverse Date,
Date,
Thread,
Author