¡¾ÇóÖú¡¿shellÖÐpingºóÔõôÅжÏÊÇ·ñpingͨ
¸÷λѧ³¤£¬Ñ§ÐÖ£¬Çë½Ìһϣ¬shellÖÐpingºó£¬ÔõôÅжÏÊÇ·ñpingͨ£¬Ð»Ð»£¡Ç°Ð©Ìì¿´µ½ÓÐλѧÐÖ˵ÐèÒªÖØ¶¨Ïòµ½Îļþ£¬ÄÜ·ñ˵µÃ¾ßÌåµã£¬Öض¨Ïòµ½Îļþºó¸ÃÔõô¶ÁÕâ¸öÖØ¶¨ÏòµÄÎļþ£¬Ð»Ð»£¡ [code][0 No.1980 huan ~ ]$ ping -c3 10.3.51.41 && echo -e "\nOK" || echo -e "\nFailed"
PING 10.3.51.41 (10.3.51.41) 56(84) bytes of data.
64 bytes from 10.3.51.41: icmp_seq=1 ttl=64 time=0.075 ms
64 bytes from 10.3.51.41: icmp_seq=2 ttl=64 time=0.060 ms
64 bytes from 10.3.51.41: icmp_seq=3 ttl=64 time=0.061 ms
--- 10.3.51.41 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.060/0.065/0.075/0.009 ms
OK
[0 No.1981 huan ~ ]$ ping -c3 10.3.51.42 && echo -e "\nOK" || echo -e "\nFailed"
PING 10.3.51.42 (10.3.51.42) 56(84) bytes of data.
From 10.3.51.41 icmp_seq=1 Destination Host Unreachable
From 10.3.51.41 icmp_seq=2 Destination Host Unreachable
From 10.3.51.41 icmp_seq=3 Destination Host Unreachable
--- 10.3.51.42 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 1999ms
, pipe 3
Failed
[0 No.1982 huan ~ ]$
[/code] ȷʵÊÇÕý½â£¬·Ç³£¼ò½à£¬PF¡£
Ò³:
[1]