简单处理如下
for i in 10.201.224.{21..80} ;do if [[ $(wget -q -t 1 --spider --dns-timeout 3 --connect-timeout 10 $i:5200; echo $?) -eq 0 ]]; then echo "$i is OK"; else echo "$i is FAIL"; fi ;done
简单处理如下
for i in 10.201.224.{21..80} ;do if [[ $(wget -q -t 1 --spider --dns-timeout 3 --connect-timeout 10 $i:5200; echo $?) -eq 0 ]]; then echo "$i is OK"; else echo "$i is FAIL"; fi ;done