help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] stdout and stderr to two different process substitutions


From: Pierre Gaston
Subject: Re: [Help-bash] stdout and stderr to two different process substitutions
Date: Wed, 25 Jan 2012 09:47:54 +0200

On Wed, Jan 25, 2012 at 9:41 AM, Peng Yu <address@hidden> wrote:
>>  $ prog > >(gzip > xxx.gz) 2> >(gzip > yyy.gz)
>
> Thanks for your detailed explanation. I misunderstood the usage of >().
>
> Now, I want to tee stderr to a file but I also want to see the stderr
> output on the screen. Obviously, the following do not work. Could let
> me know if there is a way to show stderr on the screen as well as
> saving it to a file? Thanks!
>
> prog > >(gzip > xxx.gz) 2> >(tee > yyy.txt)
>
One way :
{ prog > >(gzip > xxx.gz) 2> >(tee yyy.txt >&3) ; } 3>&2



reply via email to

[Prev in Thread] Current Thread [Next in Thread]