shell 使用ping测试网络

 

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

ping -c 3 192.168.1.1 | grep '0 received' | wc -l

 

posted @ 2018-12-09 20:12  anobscureretreat  阅读(736)  评论(0编辑  收藏  举报