标签:code exist else bash root cat amp null des
#!/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
标签:code exist else bash root cat amp null des
原文地址:https://blog.51cto.com/sampsondotqiu/2490643