#!/bin/sh
if [ a$1 = a"" ] ; then
count0=1
count1=1
count2=1
count3=1
while [ $count0 -le 255 ]
do
date
while [ $count1 -le 255 ]
do
while [ $count2 -le 255 ]
do
while [ $count3 -le 255 ]
do
echo "==================================================================="
dev="$count0.$count1.$count2.$count3"
ping $dev
if [ -z "$?" ] ; then
echo "Pass: $dev is active!"
else
echo "Fail: $dev is not active!"
fi
count3=`expr $count3 + 1`
done
count2=`expr $count2 + 1`
done
count1=`expr $count1 + 1`
done
date
count0=`expr $count0 + 1`
done
else
dev=$1
fi
阅读(1878) | 评论(0) | 转发(0) |