Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: how to pipe to stdout and stderr
- X-seq: zsh-users 6917
- From: Ibraheem Umaru-Mohammed <umarumohammed@xxxxxxxxxxxxxx>
- To: Andy Spiegl <zsh.Andy@xxxxxxxxx>
- Subject: Re: how to pipe to stdout and stderr
- Date: Thu, 18 Dec 2003 01:44:40 +0000
- Cc: ZSH User List <zsh-users@xxxxxxxxxx>
- In-reply-to: <20031218001201.GA27866@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20031218001201.GA27866@xxxxxxxxx>
On Thu, 2003-12-18 at 00:12, Andy Spiegl wrote:
> Maybe I'm just too tired right now, but I can't find the solution how to
> pipe the standard output and standard error to 2 different programs.
>
> Example:
> program foo (prints to stdout and stderr)
> program bar1 should receive only stdout
> program bar2 should receive only stderr
>
> How can I do this? Someone knows how to do that in bash, too?
[...]
<ibraheem@umarumohammed:~/try> ls
<ibraheem@umarumohammed:~/try> touch foo
<ibraheem@umarumohammed:~/try> ls foo bar
ls: bar: No such file or directory
foo
<ibraheem@umarumohammed:~/try> ls foo bar > stdout 2> stderr
<ibraheem@umarumohammed:~/try> cat stdout
foo
<ibraheem@umarumohammed:~/try> cat stderr
ls: bar: No such file or directory
[...]
HTH,
--ibz.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author