Here is my sample :
PING my.host.local (10.10.10.10): 56 data bytes
64 bytes from 10.10.10.10: icmp_seq=0 ttl=63 time=2.034 ms
--- my.host.local ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 2.034/2.034/2.034/0.000 ms
I would like to do something like : if /64 bytes/ then print something like : "'my.host.local' is up"
The problem is when I do a regex of /64 bytes/ then I'm losing the line showing the host name "my.host.local" and therefore I can't use that field to print my final message.
how would you do this ?
Cheers,