Hello, dear forum users.
Tell me please. There is such a task:
Write a batch file that would read the log file line by line: read the number of lines in which there is an answer and in which there is no answer, and then calculated the average value. And the percentage of losses would be good.
The log file looks like this:
Host: 192.168.10.12 2014-11-08 - 12:08:58 Reply from 192.168.10.12: bytes=32 time=5ms TTL=125 2014-11-08 - 12:08:59 Reply from 192.168.10.12: bytes=32 time=4ms TTL=125 2014-11-08 - 12:09:01 Reply from 192.168.10.12: bytes=32 time=9ms TTL=125 2014-11-08 - 12:09:10 Reply from 192.168.10.12: bytes=32 time=4ms TTL=125 2014-11-08 - 12:09:11 Reply from 192.168.10.12: bytes=32 time=6ms TTL=125 2014-11-08 - 12:09:12 Ping timed out. 2014-11-08 - 12:09:13 Ping timed out. 2014-11-08 - 12:09:14 Ping timed out. 2014-11-08 - 12:09:28 Ping timed out. 2014-11-08 - 12:09:33 Ping timed out. 2014-11-08 - 12:09:38 Ping timed out. 2014-11-08 - 12:09:43 Ping timed out. 2014-11-08 - 12:09:48 Ping timed out. 2014-11-08 - 12:09:53 Reply from 192.168.10.12: bytes=32 time=5ms TTL=125 2014-11-08 - 12:09:54 Reply from 192.168.10.12: bytes=32 time=35ms TTL=125 2014-11-08 - 12:09:55 Reply from 192.168.10.12: bytes=32 time=51ms TTL=125 Thank you for your help.