I have a script which always returns an integer. When I run

snmpwalk -v1 localhost .1.3.6.1.4.1.8072.1.3 (extend testscript /test.sh)

or

snmpwalk -v1 localhost .1.3.6.1.4.1.2021.8.1 (exec test2 /test.sh)

I always get a STRING with my number in output. The number gets quite large, so I cannot use exit status. How can I get an INTEGER out of it ?

PS: linux centos 5.5, net-snmp