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

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


snmpwalk -v1 localhost . (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