$ ping baidu.com PING baidu.com (220.181.38.148): 56 data bytes 64 bytes from 220.181.38.148: icmp_seq=0 ttl=53 time=37.463 ms 64 bytes from 220.181.38.148: icmp_seq=1 ttl=53 time=36.565 ms 64 bytes from 220.181.38.148: icmp_seq=2 ttl=53 time=35.840 ms 64 bytes from 220.181.38.148: icmp_seq=3 ttl=53 time=36.733 ms 64 bytes from 220.181.38.148: icmp_seq=4 ttl=53 time=36.475 ms
$ ping baidu.com | tee output.txt PING baidu.com (220.181.38.148): 56 data bytes 64 bytes from 220.181.38.148: icmp_seq=0 ttl=53 time=42.524 ms 64 bytes from 220.181.38.148: icmp_seq=1 ttl=53 time=39.871 ms 64 bytes from 220.181.38.148: icmp_seq=2 ttl=53 time=41.977 ms 64 bytes from 220.181.38.148: icmp_seq=3 ttl=53 time=38.483 ms 64 bytes from 220.181.38.148: icmp_seq=4 ttl=53 time=43.906 ms $ cat output.txt PING baidu.com (220.181.38.148): 56 data bytes 64 bytes from 220.181.38.148: icmp_seq=0 ttl=53 time=42.524 ms 64 bytes from 220.181.38.148: icmp_seq=1 ttl=53 time=39.871 ms 64 bytes from 220.181.38.148: icmp_seq=2 ttl=53 time=41.977 ms 64 bytes from 220.181.38.148: icmp_seq=3 ttl=53 time=38.483 ms 64 bytes from 220.181.38.148: icmp_seq=4 ttl=53 time=43.906 ms