7
rated 0 times
[
7]
[
0]
/ answers: 1 / hits: 1720
/ 2 Years ago, sat, september 10, 2022, 2:41:29
I need help to extract only the time's value when pinging using sed.
ping 192.168.1.1
PING 192.168.1.11 (192.168.1.11) 56(84) bytes of data.
64 bytes from 192.168.1.11: icmp_seq=1 ttl=64 time=0.028 ms
64 bytes from 192.168.1.11: icmp_seq=2 ttl=64 time=0.027 ms
64 bytes from 192.168.1.11: icmp_seq=3 ttl=64 time=0.024 ms
64 bytes from 192.168.1.11: icmp_seq=4 ttl=64 time=0.031 ms
So after using sed I would like to get the following output:
ping 192.168.1.1 | sed '???'
0.028
0.027
0.024
0.031
Thank you!
More From » command-line