9 Oct
2002
9 Oct
'02
12:24
This should do the job, sort of... Note: change the "203.30.61" to the first 3 octets of the range you need to enquire on. Note that this was written for an HP/UX system, so tweaking may be required. YMMV. NBS. SAR. If anyone has a more elegant way of doing this, please let us all know ! for net in "203.30.61" ; do count=0;export count while [ ${count} -lt 254 ] ; do count=`expr ${count} + 1` if /bin/ping -c1 ${net}.${count} > /dev/null ; then echo "There is something at ${net}.${count}" >> pingit.yes else echo "There is nothing at ${net}.${count}" >> pingit.no fi done done ------------------------------------------- Regards, Jon - Committees keep minutes and lose hours.