Created
September 9, 2014 10:00
-
-
Save nkonev/53c7280c17ad330bb29f to your computer and use it in GitHub Desktop.
test-redir.bat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :: http://stackoverflow.com/questions/13399017/redirect-stdout-and-stderr-from-inside-a-batch-file | |
| :: http://www.4its.ru/html/windows-cmd.html | |
| :: перенавляем `>stdout.log` поток STDOUT(1) в файл stdout.log, также перенавляем `2>&1` STDERR(2) в STDOUT(1), чтобы они оба оказались в одном файле | |
| >stdout.log 2>&1 ( | |
| echo Some text | |
| :: здесь мы пишем в STDERR | |
| echo Error 1>&2 | |
| ) | |
| pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment