Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- snmp_extend_oid (){
- oid=$1; tag=$2;
- taglen=$(expr length $tag)
- tag_oid=$(
- echo "${tag}"| sed 's/\(.\)/\1\n/g'| while read char ;do
- if [ ! -z "${char}" ];then
- echo -n .
- echo -n $(( ( 256 + $(printf '%d' "'$char"))%256 ));
- fi
- done
- )
- echo ${oid}.4.1.2.${taglen}${tag_oid}.1
- }
- swalk eir $(snmp_extend_oid .1.3.6.1.4.1.32372.1.1.2.1.1.1.1 w.time)
Add Comment
Please, Sign In to add comment