Usually, when pinging a server IP address we have this in return:
Pinging <IP address> with 32 bytes of data:
Reply from <ip> : bytes=32 time=151 TTL=121
Reply from <ip> : bytes=32 time=151 TTL=121
Reply from <ip> : bytes=32 time=151 TTL=121
Reply from <ip> : bytes=32 time=151 TTL=121
Ping statistics for <IP address>:
packets: sent = 4, Received = 4, lost = 0 (0% loss),
Approximate round trip times in milli-secounds:
Minimum = 151ms, Maximum = 151 ms, Average = 151 ms
How do I get only the following line (only the reply line of one ping test) in return by a simple command in cmd.exe on Windows (whatever Windows language used)?
Reply from <IP address> : bytes=32 time=151 TTL=121
Maybe the simplest way is to display only the second line? How should this be done? Because I don't know how to do it on Windows.
This may work more universally.
ping -n 1 <hostname/IP> | FIND "TTL="