a=0 for xgip in ${xgipset[*]} do let a+=1 fping $xgip|grep alive >/dev/null if [ $a != 3 ];then if [ $? = 0 ];then echo -n "$outip与$xgip正常通信," else echo -n "$outip与$xgip不可达," fi else if [ $? = 0 ];then echo "$outip与$xgip正常通信," else echo "$outip与$xgip不可达," fi fi
原文地址:https://www.cnblogs.com/betterquan/p/11664442.html
时间: 2024-10-11 17:05:04