- 帖子
- 239
- 积分
- 295
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2010-4-11
|
[其他] 有关mtee v2.21版本的参数/E的问题
最近发现mtee升级到了最新的2.21版本,下载下来后发现,里面新增了一个参数 /E,貌似是在可以将errorlevel在使用管道
后仍然可见,但是我一直没有试验成功,求大神帮忙分析一下
MTEE v2.21 Win32 Commandline Standard Stream Splitter for Windows XP .. 10.
Copyright (c) 2001-2016 Ritchie Lawrence, http://www.commandline.co.uk.
MTEE [/A | /U] [/C] [/D] [/T] [/E] [[/+] file] [...]
/A Convert output to ANSI. Default output is same as input.
/C Continue if errors occur opening/writing to file (advanced users only).
/D Prefix each line of output with local date in YYYY-MM-DD format.
/T Prefix each line of output with local time in HH:MM:SS.MSS format.
/U Convert output to UNICODE. Default output is same as input.
/E Exit with exit code of piped process.
/+ Append to existing file. If omitted, existing file is overwritten.
file File to receive the output. File is overwritten if /+ not specified.
... Any number of additional files. Use /+ before each file to append.
Example usage:-
1) script.cmd | mtee result.txt
2) ftp -n -s:ftp.scr | mtee local.log /+ \\server\logs$\remote.log
3) update.cmd 2>&1 | mtee/d/t/+ log.txt
1) Sends the output of script.cmd to the console and to result.log. If
result.txt already exists, it will be overwritten.
2) Sends output of automated ftp session to the console and two log files,
local.log is overwritten if it already exists, remote.log is appended to.
3) Redirects stdout and stderr from update.cmd to console and appends to
log.txt. Each line is prefixed with local date and time. |
|