[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Merge stdout/stderr to a file yet preserve their distinc
From: |
Dennis Williamson |
Subject: |
Re: [Help-bash] Merge stdout/stderr to a file yet preserve their distinction as well |
Date: |
Wed, 14 Nov 2018 23:19:39 -0600 |
On Wed, Nov 14, 2018, 10:54 PM Peng Yu <address@hidden wrote:
> Hi,
>
> I'd like to pipe stdout/stderr to a file. But I also want them to be
> printed to the terminal with them separately as stdout/stderr.
>
> It seems that none of the things mentioned below can satisfy both
> requirements. Could anybody confirm whether it is indeed impossible to
> satisfy both requirements? Thanks.
>
>
> https://stackoverflow.com/questions/363223/how-do-i-get-both-stdout-and-stderr-to-go-to-the-terminal-and-a-log-file
> cmd 2>&1 | tee output.file
>
> --
> Regards,
> Peng
>
Look at
https://mywiki.wooledge.org/BashFAQ/106
under "complex duplicate logging".
>