#!/bin/bash net=192.168.192 #启始IP ip=1 while [ $ip -le 254 ] do ping $net.$ip -w 1 ip=`expr $ip + 1` done