我正在运行一个具有大运行时间和大输出的程序,因此为了在查看输出时进行日志记录,我tee在 windows 上使用命令cmd.exe:
tee
cmd.exe
./program | tee -a program.log
的program打印输出住(具有显着的时间间隙行之后线),但是tee打印仅输出程序终止之后。有什么方法可以tee与实时输出一起使用吗?
program
注意:该问题在 windows 上也仍然存在 powershell.exe
powershell.exe
windows powershell cmd
cmd ×1
powershell ×1
windows ×1