perl telnet issue with cisco


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting perl telnet issue with cisco
# 1  
Old 11-11-2010
perl telnet issue with cisco

Hi Experts,

I am using perl to telnet on cisco boxes. We have this stupid cisco node which does not support "terminal Length0" command.
Since I am using Net::Telnet and capturing output with
HTML Code:
@output = $telnet->cmd('cmd');
Say
HTML Code:
@output = $telnet->cmd('show version');
Now problem is, output is long and cisco append ---More---- and wait for you to press space / enter key.
This fails my logic to format output and i get crazy lines.
is there a way in perl to take care of this ---More--- and enable to capture complete output of command in single attempt.

Thanks in advance.
# 2  
Old 11-11-2010
# 3  
Old 11-30-2010
Hi Experts...
I am sorry to bring thing old issue up again. I was busy with some other stuff so this thing was kept on hold. I did try sending multiple lines at once option and it did work for commands with small outputs.
I need to take care of "show logs" that means 1000 lines may be more and I am not willing put 50 "\n" in script.
Either i am must able to run a loop using "waitfor" to take care of --More-- or something else.

any hints ?
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl Telnet cisco routers

Hi all i have little problem finding solution about simple telnet script .... i have 250 routers and on some i have different password and on some they ask just for password no username. So for example 1,2,3 have username and password (user,password) 4, and 5 have different username and password... (0 Replies)
Discussion started by: IvanMP
0 Replies

2. Shell Programming and Scripting

Perl cisco copy running to startup

Hi all, i have a small simple perl that i cant make it work it is really stupid but i cant find solution and i needed fast. im trying to copy running to startup on a cisco router and show me the output like is ok Destination filename ? Building configuration... so the code i have is ... (0 Replies)
Discussion started by: IvanMP
0 Replies

3. Shell Programming and Scripting

Perl variables inside Net::Telnet::Cisco Module doesn't work

I am writing perl script to configure Cisco device but Variables inside Net::Telnet::Cisco Module doesn't work and passed to device without resolving. Please advise. here is a sample of script: use Net::Telnet::Cisco; $device = "10.14.199.1"; ($o1, $o2, $o3, $o4) = split(/\./,$device);... (5 Replies)
Discussion started by: ahmed_zaher
5 Replies

4. Shell Programming and Scripting

Expect/telnet/testing tacacs on a cisco

At times I find the need to test that the tacacs port 49 is open. The code below works but is painfully slow because I have to wait on the timeouts. Examples of possible responds router1#telnet 10.11.20.14 49 Trying 206.112.204.140, 49 ... Open route1#telnet 10.11.19.14 49 Trying... (1 Reply)
Discussion started by: popeye
1 Replies

5. Shell Programming and Scripting

Webpage to Telnet via Perl and Expect: Telnet problem?

Somewhat long story: I have a simple Perl CGI script that uses Expect to Telnet to a device and grab some data, and then spits it back to Perl for display on the Webpage. This works for many devices I've tried, but one device just fails, it keeps rejecting the password on this device, only... (1 Reply)
Discussion started by: jondo
1 Replies

6. Shell Programming and Scripting

Perl telnet to cisco router and compare the ping ms

All Please help, i will telnet to router to obain the ping status and compare, if higher than normal latency, i will have further action.. if i do the telent and in perl script then .... e.g the result i obtain from the router will be =' Success rate is 100 percent (5/5), round-trip... (4 Replies)
Discussion started by: optimus
4 Replies
Login or Register to Ask a Question