Re: tee -a to to files
- From: Stephane Chazelas <stephane_chazelas@xxxxxxxx>
- Date: 09 Dec 2005 13:31:56 GMT
On Thu, 08 Dec 2005 13:07:25 +0200, Etienne Marais wrote:
[...]
> 2) two files, one containg stdout and the other stderr ?
[...]
> 2) command 2> /path/to/errfile | tee /path/to/stdoutfile
>
> But 2 will not display errors on the output anymore,
> perhaps that's part of the reason you asked ?
>
> How does one do ' 2| ' analogous to ' 2> ' ?
2> is a redirection operator, "|" is a more complicate thing
that starts two commands simultanously and does some implicit
redirections. You can change those redirections with redirection
operators:
{ cmd 2>&1 >&3 3>&- | tee err >&2 3>&-; } 3>&-
{ { cmd | tee out; } 2>&1 >&3 3>&- | tee err >&2 3>&-; } 3>&1
--
Stephane
.
- References:
- Re: tee -a to to files
- From: Kenny McCormack
- Re: tee -a to to files
- From: Etienne Marais
- Re: tee -a to to files
- Prev by Date: Re: why 'find / -name *' doesnt work ?
- Next by Date: Re: show file ages -- better than ls -l
- Previous by thread: Re: tee -a to to files
- Next by thread: How to speed up this backup script.
- Index(es):
Relevant Pages
|