Can you fool isatty AND log stdout and stderr separately?

前端 未结 4 1740
悲&欢浪女
悲&欢浪女 2020-12-28 12:55

Problem

So you want to log the stdout and stderr (separately) of a process or subprocess, without the output being different from what you\'d see in the terminal i

4条回答
  •  生来不讨喜
    2020-12-28 13:20

    When you can use the script command:

    $ script --return -c "[executable string]" >stdout 2>stderr
    

提交回复
热议问题