R
robertchen117
I have a long list of host/node configuration file need to parsed and
print in a CGI table.
I want to sort them by group and then by address, by on_off, polling.
Please help me how to do it. The node name is unique. If just sort by
name, it is easy...
begin node
name ge17.net.domain.com
on_off on
group CISCO-SWITCH
suppress no
auto_delete yes
read_community OJ3yEgsBQ7
write_community public
address 10.9.1.118
port 161
snmp_version 2
engineid 0
auth_protocol 0
is_key_ok 1
error_status 0
security_level 0
end node
begin node
name v255.net.domain.com
on_off on
group CISCO-SWITCH
suppress no
auto_delete yes
read_community OJ3yEgsBQ7
write_community public
address 10.9.255.3
port 161
snmp_version 2
engineid 0
auth_protocol 0
is_key_ok 1
error_status 0
security_level 0
end node
begin node
name sqw11.domain.com
on_off on
group CISCO-SWITCH
suppress no
auto_delete yes
read_community OJ3yEgsBQ7
write_community public
address 10.7.255.144
port 161
snmp_version 2
engineid 0
auth_protocol 0
is_key_ok 1
error_status 0
security_level 0
end node
begin node
name sqw25.net.domain.com
on_off on
group CISCO-SWITCH
suppress no
auto_delete yes
read_community OJ3yEgsBQ7
write_community public
address 10.7.255.15
port 161
snmp_version 2
engineid 0
auth_protocol 0
is_key_ok 1
error_status 0
security_level 0
end node
.....
print in a CGI table.
I want to sort them by group and then by address, by on_off, polling.
Please help me how to do it. The node name is unique. If just sort by
name, it is easy...
begin node
name ge17.net.domain.com
on_off on
group CISCO-SWITCH
suppress no
auto_delete yes
read_community OJ3yEgsBQ7
write_community public
address 10.9.1.118
port 161
snmp_version 2
engineid 0
auth_protocol 0
is_key_ok 1
error_status 0
security_level 0
end node
begin node
name v255.net.domain.com
on_off on
group CISCO-SWITCH
suppress no
auto_delete yes
read_community OJ3yEgsBQ7
write_community public
address 10.9.255.3
port 161
snmp_version 2
engineid 0
auth_protocol 0
is_key_ok 1
error_status 0
security_level 0
end node
begin node
name sqw11.domain.com
on_off on
group CISCO-SWITCH
suppress no
auto_delete yes
read_community OJ3yEgsBQ7
write_community public
address 10.7.255.144
port 161
snmp_version 2
engineid 0
auth_protocol 0
is_key_ok 1
error_status 0
security_level 0
end node
begin node
name sqw25.net.domain.com
on_off on
group CISCO-SWITCH
suppress no
auto_delete yes
read_community OJ3yEgsBQ7
write_community public
address 10.7.255.15
port 161
snmp_version 2
engineid 0
auth_protocol 0
is_key_ok 1
error_status 0
security_level 0
end node
.....