Tuesday, 27 August 2013

How to make ping less verbose

How to make ping less verbose

I want to make ping less verbose for my batch script, but I do want it to
show time-out messages and other errors.
This is what I've got so far:
@echo off
:BEGIN
time /T
ping 127.0.0.0 -n 1 | find "TTL"
ping 127.0.0.1 -n 1 | find "TTL"
ping 1.1.1.1 -n 1 | find "TTL"
sleep 10s
GOTO BEGIN
This works, but it is hard to spot the errors on 127.0.0.0 and 1.1.1.1
that give an error message and a time-out message. (I mostly care about
the time-out actually).
Is there any way to make find filter lines with time out and TTL, or
perhaps another trick i can use?

No comments:

Post a Comment