SMarcell
(usa Slackware)
Enviado em 14/12/2017 - 19:06h
$ cat lista_hosts
duckduckgo.com
bing.com
google.com
$ cat lista_hosts | xargs -I % host -t A % | grep -Eo '([0-9]{1,3}.){3}[0-9]{1,3}' | xargs -I % ping -c1 % > pings
$ cat pings
PING 107.21.1.61 (107.21.1.61) 56(84) bytes of data.
64 bytes from 107.21.1.61: icmp_seq=1 ttl=39 time=183 ms
--- 107.21.1.61 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 183.994/183.994/183.994/0.000 ms
PING 184.72.115.86 (184.72.115.86) 56(84) bytes of data.
64 bytes from 184.72.115.86: icmp_seq=1 ttl=39 time=178 ms
--- 184.72.115.86 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 178.446/178.446/178.446/0.000 ms
PING 184.72.106.52 (184.72.106.52) 56(84) bytes of data.
64 bytes from 184.72.106.52: icmp_seq=1 ttl=39 time=179 ms
--- 184.72.106.52 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 179.179/179.179/179.179/0.000 ms
PING 23.21.193.184 (23.21.193.184) 56(84) bytes of data.
64 bytes from 23.21.193.184: icmp_seq=1 ttl=40 time=170 ms
--- 23.21.193.184 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 170.438/170.438/170.438/0.000 ms
PING 204.79.197.200 (204.79.197.200) 56(84) bytes of data.
64 bytes from 204.79.197.200: icmp_seq=1 ttl=114 time=116 ms
--- 204.79.197.200 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 116.150/116.150/116.150/0.000 ms
PING 13.107.21.200 (13.107.21.200) 56(84) bytes of data.
64 bytes from 13.107.21.200: icmp_seq=1 ttl=107 time=92.8 ms
--- 13.107.21.200 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 92.874/92.874/92.874/0.000 ms
PING 216.58.202.142 (216.58.202.142) 56(84) bytes of data.
64 bytes from 216.58.202.142: icmp_seq=1 ttl=47 time=93.2 ms
--- 216.58.202.142 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 93.285/93.285/93.285/0.000 ms