当我使用find命令搜索字符串并打印字符串时,也会打印文件名。有没有办法避免打印文件名?在批处理脚本中使用'FIND'命令时避免打印文件名
对于防爆: 考虑一个文件Sample.log包含,
INF000005: <0> Error(s) and <0> Warning(s) detected.
INF000006: Execution completed successfully.
我运行以下命令的批处理文件。
find " error " Sample.log >Result.txt
中的Result.txt输出的电流
---------- .\Sample.log
INF000005: <0> Error(s) and <0> Warning(s) detected.
中的Result.txt
预计产量
INF000005: <0> Error(s) and <0> Warning(s) detected
谢谢...它的工作非常好... –