1

I'm debugging a batch file left behind by an old employee and I've come across the line:

@nmake -f makefile /E 2>&1 | tee %LOGFILEPATH%  

What does this do?
I know what @nmake -f makefile /E does and I know what tee %LOGFILEPATH% does, but I can't find anything on what the 2>&1 | means.
Thanks

Dasmowenator
  • 5,505
  • 5
  • 36
  • 50
  • @See http://www.robvanderwoude.com/redirection.php and http://www.robvanderwoude.com/battech_redirection.php – BalusC Jun 15 '10 at 17:50

2 Answers2

4

2>&1 redirects standard error to standard out.

| pipes the output from nmake into tee.

Richard Fearn
  • 25,073
  • 7
  • 56
  • 55
2

2>&1 redirects the standard error stream to standard output.

The pipe | redirects standard output of the first command to the standard input to the second command.

So your command, bunches all output from nmake and redirects it all to tee

Ben S
  • 68,394
  • 30
  • 171
  • 212