[Whonix-devel] [Help-bash] How to create a real copy of file descriptors stdout / stderr?

Patrick Schleizer patrick-mailinglists at whonix.org
Mon Feb 27 22:41:00 CET 2017


Greg Wooledge:
> On Mon, Feb 27, 2017 at 07:57:00PM +0000, Patrick Schleizer wrote:
>> Patrick Schleizer:
>>> unbuffer apt-get "$@" 1> >(tee -a "$logfile") 2> >(tee -a "$logfile" >&2)
>>
>> Could we even use
>> &>
>> ?
> 
> In a previous email, he said it was *noninteractive*.  So why not just
> do:
> 
> unbuffer apt-get blah 2>&1 | tee -a logfile
> 
> Since both stdout and stderr are going to the same logfile, keep it
> simple.

Simpler and works for me.

> I don't even know whether apt-get needs unbuffer in the first place.
> You could try leaving it out.

Without unbuffer, colors and progress information are lost from console
output, which I wanted to prevent.



More information about the Whonix-devel mailing list