help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] exec > >(tee -a foo.log) alternative?


From: Pierre Gaston
Subject: Re: [Help-bash] exec > >(tee -a foo.log) alternative?
Date: Sun, 22 Dec 2013 10:15:49 +0200

On Sun, Dec 22, 2013 at 12:04 AM, adrelanos <address@hidden> wrote:

> Hi!
>
> exec >  >(tee -a foo.log)
> exec 2> >(tee -a foo.log >&2)
>
> Is there any alternative to the above statements? I find it troublesome,
> that these processes aren't cleaned up after the script terminated.
>

you can put your code in, say, :
main () {
....
}
main "$@" | tee -a foo.log


Is it also recommended/possible to avoid involving "tee"? For
> performance reasons maybe?
>
> Cheers,
> adrelanos
>
>


reply via email to

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