1.

Solve : logging shell output?

Answer»

Hi,

I need to TAKE the output of a batch file and put it to a log file.  This needs to at the same time output to the screen.  I have tried using tee but SINCE i am using win98se, the batch wont send the output to the screen untill the command(xcopy) in the batch file is done.  But since the command WAITS for the user to anser y or n, the user needs to see the output of xcopy one line at a time, not just all at once when the command is finished.  I will attach my batch file below.  But what I want is to send the output of the batch file to both the screen and a log file.

john

xcopy Z:\JJJ\test\*.* C:\Temp\JJJ\sync\test /v /f /d /s /e /k /-y | tee.exe -a sync%MM%-%dd%-%YY%.logany ideas???



Discussion

No Comment Found