检查网段剩余IP 2014/12/21 15791 #!/bin/bash read -p "Please keyin the network segment: (e.g. 10.88.1) " farm for i in `seq 2 255` do ip="$farm.$i" ping -c 3 $ip &> /dev/null if [ $? -eq 0 ];then echo "$ip is on line" else echo "$ip is not on line" fi done