
evandro06
(usa Ubuntu)
Enviado em 04/09/2016 - 14:54h
Marcelo, com o comando que você enviou, só está aparecendo o horário, a data não aparece. Além do horário, tem como aparecer a data também?
_di0 escreveu:
ping endereco_ip | perl -nle 'BEGIN {$|++} print substr(scalar(localtime), 10, 9), " ", $_' > testedeping.txt
13:04:17 PING 200.1.76.161 (200.1.76.161) 56(84) bytes of data.
13:04:17 64 bytes from 200.1.76.161: icmp_seq=1 ttl=63 time=4.66 ms
13:04:18 64 bytes from 200.1.76.161: icmp_seq=2 ttl=63 time=5.10 ms
13:04:19 64 bytes from 200.1.76.161: icmp_seq=3 ttl=63 time=4.24 ms
13:04:20 64 bytes from 200.1.76.161: icmp_seq=4 ttl=63 time=5.06 ms
13:04:21 64 bytes from 200.1.76.161: icmp_seq=5 ttl=63 time=4.22 ms
13:04:22 64 bytes from 200.1.76.161: icmp_seq=6 ttl=63 time=4.70 ms
13:04:23 64 bytes from 200.1.76.161: icmp_seq=7 ttl=63 time=4.67 ms
13:04:24 64 bytes from 200.1.76.161: icmp_seq=8 ttl=63 time=5.04 ms