On 05/12/06, Patai Tamás <[EMAIL PROTECTED]> wrote:
> Is it possible to get the clear result of the snmget command back to the
> application?
$ man snmpcmd
OUTPUT OPTIONS
-Ov Output only the variable value, not the OID:
snmpget -c public -v 1 -Ov localhost ip.ipForwarding.0
INTEGER: forwarding(1)
[plus various other -O options to disable "helpful" interpretations]
> My problem is that the mibs I use are not fully compilant but I only need
> some part of them for my pusposes and it is fine, but 'snmget' prints some
> error messages that appear in its output:
Try discarding standard error:
myval=`snmpget ... opticalPathName.2 2>/dev/null`
echo $myval
Dave
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders