#!/bin/basha=`seq 1 255`for i in $ado ping -c 1 192.168.10.$a if [ $? -eq 0 ] then echo "能ping通" else echo "ping不通" fidone