I would like to as if it is possible to strip the result of the 'ping' command form the last three lines which are always:
--- domain.com ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 3.837/4.501/4.839/0.469 ms
Would it be possible to make ping to NOT show this lines?
I have tried with the following:
ping -c2 domain.com | xargs grep -v "statistics \|transmitted\|round-trip"
ping -c2 domain.com | grep -v "statistics \|transmitted\|round-trip"
But it does not seem to be working. This is tested on a Mac only. It is not tested on Linux.
So, i was wondering if it will be possible to make this work somehow? May be with awk or something?