Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the tee command always wait for EOF?

I'd like to log the output of a command to stdout as well as to a log file. I've got Cygwin installed and I'm trying to use the tee command to accomplish this.

devenv mysolution.sln /build myproject "Release|Win32" | tee build.log

Trouble is that tee seems to insist on waiting for the end of file before outputting anything to either stdout or the log file. This takes away the point of it all, which is to have a log file for future reference, but also some stdout logging so I can easily see the build progress.

tee's options appear to be limited to --append, --ignore-interrupts, --help, and --version. So is there another method to get to what I'm trying to do?

like image 716
Owen Avatar asked Mar 01 '23 07:03

Owen


1 Answers

You can output to the file and tail -f the file.

devenv mysolution.sln /build myproject "Release|Win32" > build.log &

tail -f build.log

like image 194
Sam Reynolds Avatar answered Mar 05 '23 17:03

Sam Reynolds