I would like to redirect the output from a command to a file and to stdout. I am using Windows XP command line.
I realize that there is a command in linux called tee which will do this, but I want this in windows.
I would like to redirect the output from a command to a file and to stdout. I am using Windows XP command line.
I realize that there is a command in linux called tee which will do this, but I want this in windows.
The simple DOS shell doesn't have the ability to do this simultaneously.
Try using:
or
The first hit when googling windows tee gives UNIX-style tee utility for Windows
PowerShell has tee-object (standard alias tee) if you are using a decent shell.
If using tee (one of the various Windows variants) isn't an option and the command isn't long-running or you don't need to do further processing of the output in real time, then
command > file && type file
would do that for you. But only under the mentioned circumstances. You're probably be better off using tee.