【发布时间】:2011-03-04 23:25:18
【问题描述】:
我有一个包含宏名称列表的文本文件(每行一个)。我的最终目标是打印宏名称在当前目录的文件中出现的次数。
宏的名称在C:\temp\macros.txt。
命令提示符中的type C:\temp\macros.txt 可以打印列表。
现在我想将该输出通过管道传输到findstr 的标准输入。
type C:\temp\macros.txt | findstr *.ss
(ss 是我要查找宏名称的文件类型)。
这似乎不起作用,我没有得到任何结果(非常快,它似乎根本没有尝试)。 findstr <the first row of the macro list> *.ss 确实有效。
我也尝试了findstr *.ss < c:\temp\macros.txt,但没有成功。
【问题讨论】:
标签: batch-file pipe findstr