我成功地使用findstr
在一个长列表的文件中搜索字符串。我将findstr
的输出重定向到不同的文本文件,但是我需要摆脱输出行的起始部分,该部分也包含源文件的引用。以下是示例基础。
echo testtest > testing.txt
findstr 'test' *.txt > output.txt //output is 'testing.txt:testtest'
我需要做类似于这样的事情。
echo testtest > testing.txt
findstr 'test' *.txt | *something* > output.txt //output is 'testtest'
注意事项:
我只能使用标准CMD命令,不能在目标计算机上安装新软件。
echo
打印结果,它不是总是附加CRLF吗? - Andriy M