fot IP in `cat IP.txt`
do
ping ${IP} -c 2
if [ "$?" -ne "0" ]
then
echo "${IP} is down" >>output.txt
else
echo "${IP} is up" >>output.txt
fi
done
IP写入IP.TXT文件
while truedo
if [ `ping -c 1 192.168.0.2|grep 100%|wc -l` -ne 0 ]then
echo diaoxian_192.168.0.2 >>log2
fi
done
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)