0
for /? | if (this stream has word "the" in it) {echo the line with "the"}
我需要以某種方式來分析重定向數據流中的文本。
for /? | if (this stream has word "the" in it) {echo the line with "the"}
我需要以某種方式來分析重定向數據流中的文本。
使用管道,使用豎線「|」。
對於例如:
管輸出爲成找到:輸出
for /? | find "the"
前幾行:
command Specifies the command to carry out for each file.
Specifies parameters or switches for the specified command.
To use the FOR command in a batch program, specify %%variable instead
If Command Extensions are enabled, the following additional
forms of the FOR command are supported:
If set contains wildcards, then specifies to match against directory
http://www.febooti.com/products/command-line-email/batch-files/ms-dos-command-redirection.html
本網站對不同類型的管道您可以在DOS下做的很好的信息。