ping 192.168.1.1 -c 10 | awk '{ print $0" " strftime("%Y-%m-%d %H:%M:%S",systime())}'
后台运行
nohup ping 192.168.1.1 -c 10 | awk '{ print $0" " strftime("%Y-%m-%d %H:%M:%S",systime())}' > ping.txt
间隔200ms(-i 0.2), 打印时间戳(-D)
ping 192.168.1.1 -D -i 0.2 | awk '{ print $0" " strftime("%Y-%m-%d %H:%M:%S",systime())}'