标签:docke highlight doc function ping shell false 检查 dock
[root@docker-node1 ]# cat ping.sh
#!/bin/bash . /etc/init.d/functions for var in {1..254}; do ip=192.168.0.$var ping -c2 $ip >/dev/null 2>&1 if [ $? = 0 ];then action "$ip" /bin/true else action "$ip" /bin/false fi done
#运行脚本:
chmod +x ping.sh
sh ping.sh
标签:docke highlight doc function ping shell false 检查 dock
原文地址:https://www.cnblogs.com/nulige/p/9211259.html