首页 > 其他 > 详细

ping 检测,for循环

时间:2020-04-27 14:21:30      阅读:128      评论:0      收藏:0      [点我收藏+]
#!/bin/bash for IP in `cat /root/Desktop/ip.txt` do ping -c 3 -i 0.2 -w 3 $IP &> /dev/null if [ $? -eq 0 ] then echo "This host $IP is existed" else echo "This host $IP isn‘t existed" fi done

ping 检测,for循环

原文:https://blog.51cto.com/sampsondotqiu/2490643

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!