perldumbfounded12 has asked for the wisdom of the Perl Monks concerning the following question:
having an issue with sorting and dumping files out of a router. Here is what i got..looking to sort interfaces that are DOWN/UP.
<code>#! /usr/bin/env/ perl -w use strict; use warnings; use Net::Telnet::Cisco; { use Data::Dumper; print( Dumper); } my $ip_address =""; my $username = ""; my $password = ""; my $prompt = '/.*[#\$%>]\s*$/'; my $session = Net::Telnet::Cisco->new(Host => $ip_address, Prompt => $ +prompt, Timeout =>20); $session->login($username, $password); # Execute a Command my @show_log_output = $session->cmd('show log'); my $mystring; $mystring = "up"; $mystring = "down"; print "$mystring"; print "@show_log_output\n"; #Execute a Command my @show_interface_desc_output = $session->cmd('show interface desc'); print "@show_interface_desc_output\n"; $session->close; exit;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: data dump and sort
by Illuminatus (Curate) on Aug 06, 2013 at 20:20 UTC | |
Re: data dump and sort
by 5mi11er (Deacon) on Aug 07, 2013 at 01:57 UTC | |
Re: data dump and sort
by 2teez (Vicar) on Aug 07, 2013 at 03:54 UTC |
Back to
Seekers of Perl Wisdom