CuriousBee has asked for the wisdom of the Perl Monks concerning the following question:
The input.log file does show me that it has connected to the router prompt and dump_log does have these lines at the end. > 0x00000: 73 68 6f 77 20 70 6c 61 74 66 6f 72 6d 0a show platform. < 0x00000: 0d 0a 56 50 4e 76 34 2d 31 6b 2d 52 52 30 33 23 ..VPNv4-1k-RR03# But i dont see the output of the command "show platform" anywhere.. Please help. TIA.#!C/Perl -w use strict; use warnings; use Net::Telnet; my $telnet = new Net::Telnet ( Timeout=>10, Binmode=> 1, telnetmode => + 0, Input_log=>"input.log", Dump_log=>"dump.log", Output_log=>"output +.log", Errmode=>'die', Prompt=>'/(?m:^[\w.-]+\s?(?:\(config[^\)]*\))? +\s?[\$#>]\s?(?:\(enable\))?\s*$)/'); print "I am opening a connection\n"; $telnet->open('x.y.z.x'); print "i established a connection\n"; $telnet->waitfor('/Username: $/i'); $telnet->print('xxx'); print "i entered username\n"; $telnet->waitfor('/Password: $/i'); $telnet->print('yyy'); print "i entered password\n"; $telnet->waitfor('/.*$/i'); print $telnet->cmd('show platform'); print 'I am done executing the show command'; $telnet->close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Where is my Net::Telnet output
by jettero (Monsignor) on Jul 05, 2011 at 11:59 UTC | |
by Anonymous Monk on Jul 05, 2011 at 13:06 UTC | |
by torvir (Initiate) on Jul 06, 2011 at 21:00 UTC | |
|
Re: Where is my Net::Telnet output
by decnartne (Beadle) on Jul 05, 2011 at 18:49 UTC |