biliati
(usa Debian)
Enviado em 30/08/2013 - 10:35h
Galera,
Estou com algumas duvidas para criar um script para solicitar as interfaces de diversos roteadores simutaneamente:
Não estou conseguindo roda o script
#!/bin/sh
retornoCommunity=$(cat teste3 | awk -F'\t' '{print $10}')
for community in $retornoCommunity
retornoIp=$(cat teste3 | awk -F'\t' '{print $8}')
retornoInstances=$(cat teste3 | awk -F'\t' '{print $4}')
interfaceNames=$(snmpwalk -v1 -c $community $retornoIp 1.3.6.1.2.1.2.2.1.2.$retornoInstances)
echo "$interfaceNames"
teste3
78 5 78 55 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 56 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 59 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 61 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 62 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 63 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 64 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 65 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 66 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 67 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 68 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 69 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 70 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 73 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 74 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 75 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 76 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 79 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 80 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 84 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 87 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 89 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
78 5 78 93 ifOperStatus Up Sao Paulo- 20Mb Neovia 172.30.250.250 3 Router1
79 5 79 1 ifOperStatus Up Taboao da Serra- 20Mb Neovia 200.187.142.1 3 Router2
79 5 79 2 ifOperStatus Up Taboao da Serra- 20Mb Neovia 200.187.142.1 3 Router2
79 5 79 3 ifOperStatus Up Taboao da Serra- 20Mb Neovia 200.187.142.1 3 Router2
79 5 79 4 ifOperStatus Up Taboao da Serra- 20Mb Neovia 200.187.142.1 3 Router2