Aw: Re: bash script - extend - output as integer
"Dennis Schneck" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <trinity-5542e3c4-1506-4d05-a435-2a413721d1c1-1587496406223@3c-app-webde-bs64> |
Hello Paul, thanks but exit code only max 255 (or I am wrong?) but I need 4 digets for example 9999 so is there another way ? Gesendet: Dienstag, 21. April 2020 um 15:36 Uhr Von: "Paul Herring" <[email protected]> An: "Dennis Schneck" <[email protected]> Cc: [email protected] Betreff: Re: bash script - extend - output as integer https://docs.fedoraproject.org/en-US/Fedora/18/html/System_Administrators_Guide/sect-System_Monitoring_Tools-Net-SNMP-Extending.html > Note that the exit code (“8” in this example) is provided as an INTEGER type and any output is provided as a STRING type. You want get_TempOfRoom1.sh to exit (the return code) with the value you want in the INTEGER, not echo it out. On Tue, Apr 21, 2020 at 1:56 PM Dennis Schneck <[email protected] > wrote: Hello, how to get an integer value from a bash script if using "extend" in /etc/snmp/snmpd.conf ? extend TempOfRoom1 /scripts/get_TempOfRoom1.sh got only STRING but no INTEGER NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."TempOfRoom1" = STRING: 2210 like to get: NET-SNMP-EXTEND-MIB::nsExtendResult."TempOfRoom1" = INTEGER: 2210 insted of "NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."TempOfRoom1" = STRING: 2210" Thanks _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- PJH _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users