#!/bin/sh
OLDOID=””
NEWOID=”0″
count=0
while [ “$OLDOID” != “$NEWOID” ];
do
OLDOID=$NEWOID
bin/snmpgetnext -O s -v 2c -c public 192.168.0.1 $OLDOID
NEWOID=`bin/snmpgetnext -O s -v 2c -c public 192.168.0.1 $OLDOID|awk ‘{print $1}’`
echo $NEWOID
count=`expr $count + 1`
if [ $count -gt 10 ];then
count=0
sleep 1
fi
done