- โค้ด: เลือกทั้งหมด
ping 192.168.101.20 | while read pong; do echo "$(date): $pong"; done
ตัวอย่างผลลัพธ์ครับ
- โค้ด: เลือกทั้งหมด
Mon Mar 18 17:50:15 +07 2019: 64 bytes from 192.168.101.20: icmp_seq=414 ttl=54 time=35.9 ms
Mon Mar 18 17:50:16 +07 2019: 64 bytes from 192.168.101.20: icmp_seq=415 ttl=54 time=35.7 ms
Mon Mar 18 17:50:17 +07 2019: 64 bytes from 192.168.101.20: icmp_seq=416 ttl=54 time=35.7 ms
Mon Mar 18 17:50:18 +07 2019: 64 bytes from 192.168.101.20: icmp_seq=417 ttl=54 time=35.7 ms
Mon Mar 18 17:50:19 +07 2019: 64 bytes from 192.168.101.20: icmp_seq=418 ttl=54 time=35.7 ms
Mon Mar 18 17:50:20 +07 2019: 64 bytes from 192.168.101.20: icmp_seq=419 ttl=54 time=35.7 ms
Mon Mar 18 17:50:21 +07 2019: 64 bytes from 192.168.101.20: icmp_seq=420 ttl=54 time=35.7 ms