如何在DOS下使用另一个命令的输出来运行命令?

问题描述:

例子:如何在DOS下使用另一个命令的输出来运行命令?

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下做的很好的信息。