Hi Guys,
I have a script that connects to cisco kit and runs a show ip int brief.
It gives me info like this in an array:
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 20.0.0.1 YES NVRAM up up
FastEthernet0/1 10.0.0.1 YES NVRAM up up
ATM0/1/0 unassigned YES NVRAM up up
SSLVPN-VIF0 unassigned NO unset up up
Virtual-Access1 unassigned YES unset up up
Virtual-Access2 unassigned YES unset up up
Dialer1 30.0.0.1 YES IPCP up up
I can print a single row like ( print $result[x]; )
However, How can i print just the row that has a certain IP in its row?
Ie:
How can i search the array for 20.0.0.1 and it will print:
FastEthernet0/0 20.0.0.1 YES NVRAM up up
Any ideas?
Thanks
I have a script that connects to cisco kit and runs a show ip int brief.
It gives me info like this in an array:
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 20.0.0.1 YES NVRAM up up
FastEthernet0/1 10.0.0.1 YES NVRAM up up
ATM0/1/0 unassigned YES NVRAM up up
SSLVPN-VIF0 unassigned NO unset up up
Virtual-Access1 unassigned YES unset up up
Virtual-Access2 unassigned YES unset up up
Dialer1 30.0.0.1 YES IPCP up up
I can print a single row like ( print $result[x]; )
However, How can i print just the row that has a certain IP in its row?
Ie:
How can i search the array for 20.0.0.1 and it will print:
FastEthernet0/0 20.0.0.1 YES NVRAM up up
Any ideas?
Thanks