shell 使用ping测试网络

能ping通返回1,不能返回0

ping -c 3 192.168.1.1 | grep '0 received' | wc -l
原文地址:https://www.cnblogs.com/sea-stream/p/10092932.html