help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] How to create a real copy of file descriptors stdout / s


From: Patrick Schleizer
Subject: Re: [Help-bash] How to create a real copy of file descriptors stdout / stderr?
Date: Mon, 27 Feb 2017 14:03:00 +0000

João Eiras:
> Why not just...
> 
> $ unbuffer apt-get "$@" > 1> >(tee -a ) 2> >(tee -a "$logfile" >&2)

Generally good idea. Did not work for me, but the following does...

unbuffer apt-get "$@" 1> >(tee -a "$logfile") 2> >(tee -a "$logfile" >&2)

> however, you should be careful having two tee instances writting to
> the same file. Surely you want separate log files for each file
> descriptor ?
> 

In this case I like to have stdout and stderr in the same log file so
it's looking the same as if manually run.




reply via email to

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