J
johngnub
Silly, short, handy, Open View, perl that gets the snmp system
location, ( if set in the device ) from the host ( cisco in this
case ), use map and a regex to get from the word street to the end of
the data, the data is from the nexted back ticks, for the command
snmpget, an open view command in this case. I think @foo can be a
$foo, in this case.
(@foo) = map /street(.*)/, `snmpget myrouter.at.home.org
system.sysLocation.0` ;
PS: Here I have ( many ) of the routers with location as street 123
main. Thus street is
the regex.
2 cents JB
location, ( if set in the device ) from the host ( cisco in this
case ), use map and a regex to get from the word street to the end of
the data, the data is from the nexted back ticks, for the command
snmpget, an open view command in this case. I think @foo can be a
$foo, in this case.
(@foo) = map /street(.*)/, `snmpget myrouter.at.home.org
system.sysLocation.0` ;
PS: Here I have ( many ) of the routers with location as street 123
main. Thus street is
the regex.
2 cents JB