Hi,
I am trying to scrape the output from 'show cdp neighbor interface <interface> det' for a list of ports, in Perl.
For some reason the read call never returns, causing everything to halt after the first entry in the list has been processed.
The device i am trying to scrape has paging disabled.
Any idea what this could be?
I am trying to scrape the output from 'show cdp neighbor interface <interface> det' for a list of ports, in Perl.
For some reason the read call never returns, causing everything to halt after the first entry in the list has been processed.
The device i am trying to scrape has paging disabled.
Any idea what this could be?
Perl:
my $channel = $ssh->channel();
$channel->shell;
my @ports = ("Gi1/0/1","Gi1/0/2");
foreach my $port (@ports){
print $channel "sh cdp nei $port det\n";
while (my $line = <$channel>){
#Do stuff
.
.
#This never returns
}
}