
- 帖子
- 29
- 积分
- 35
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2016-8-11
|
回复 36# pcl_test
版主,你的代码很有效,我自己改了一下,使之输出到 文件:
@findstr /i /v /c:"Request timed out" /c:"TTL=" "C:\00_EIS\1.txt" >>RR_01.txt
@pause
能大概的讲解一下吗?
我只能够 猜到, "Request timed out" 表示 删除 带有 "Request timed out" 的那一行,"TTL="表示会删除 带有"TTL="的那一行
处理后的文本:
--------------------------------------------------
Start at
2016/08/08 周一
20:03:18.32
Pinging google.com [74.125.130.138] with 32 bytes of data:
Ping statistics for 74.125.130.138:
Packets: Sent = 100, Received = 100, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 78ms, Maximum = 114ms, Average = 84ms
end at
2016/08/08 周一
20:04:57.80
--------------------------------------------------
待处理的文本:
--------------------------------------------------
Start at
2016/08/08 周一
20:03:18.32
Pinging google.com [74.125.130.138] with 32 bytes of data:
Reply from 74.125.130.101: bytes=32 time=82ms TTL=41
Request timed out.
......
Reply from 74.125.130.101: bytes=32 time=82ms TTL=41
Ping statistics for 74.125.130.138:
Packets: Sent = 100, Received = 100, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 78ms, Maximum = 114ms, Average = 84ms
end at
2016/08/08 周一
20:04:57.80
-------------------------------------------------- |
|