7

So gnu has stdbuf which allows you to modify buffering of a command's I/O stream. I need the same functionality for command prompt but I can't seem to find anything about it.

I'm simply trying to output both stdout and stderr of a program, to a logfile, without buffering (or rather, just so that they are in sync and in the same order they would be displayed as in the console).

Did I just miss some obvious command or syntax, or am I just out of luck in windows?

Mike Lui
  • 1,301
  • 10
  • 23

1 Answers1

-1

Take a look at this. I don't have Windows to test on, but my guess is that you would need something like this:

.\foo.bat > .\bar.log 2>&1 

This will default to buffered IO, which is not exactly what you want, but unbuffered output does not seem to be possible.

Community
  • 1
  • 1
hd1
  • 33,938
  • 5
  • 80
  • 91