From: Kemp, D. <dk...@em...> - 2003-05-06 09:04:34
|
Miguel, Have you tried setting the "terminal length" and "terminal width" on = the router to the size of the "window" you are using? I have a program that uses "telnet" to connect to Cisco routers without seeing the problems you are reporting. The code adjusts the terminal settings after connecting but before the user starts interacting with = the router. The code works on Solaris 7,8 and AIX 4.3.3 and goes something = like .... print $telnet "\cZ"; # Send ^Z (ctrl-Z) print $telnet "term length ".$tty->{'rows'}."\r"; $exp_match =3D $telnet->expect($timeout, -re, "^.*[#>]"); print $telnet "term width ".$tty->{'columns'}."\r"; $exp_match =3D $telnet->expect($timeout, -re, "^.*[#>]"); =20 Best Regards / Vriendelijke groeten / Mit Freundlichen Gr=FC=DFen / = Cordialement / Cordiali Saluti / Med V=E4nlig H=E4lsning / Atentamente Donald.E.S.Kemp AT&T Labs Network Management Solutions, Building 6000, Langstone Technology Park, Langstone Road, Havant, Hampshire, United Kingdom, PO9 1SA Phone: +44(0)23 9222 8424 email: dk...@em... -----Original Message----- From: Miguel [mailto:mt...@mt...] Sent: 02 May 2003 19:14 To: RGI...@cp... Cc: exp...@li... Subject: Re: [Expectperl-discuss] Solaris horizontal linewrap problem >> That looks great ... I'll give it a shot. >> >> A suggestion ... I think it may be helpful for others to put an >> example like this in the Expect man page. > > > OK, if you can provide a running example, I'll be glad to include it = in > the FAQs... :o) > Well, I have an example that runs, but it doesn't do the right thing :( The behavior is the same as before ... some evil spirit is still doing = me the favor of linewrapping. I am completely dumbfounded. Went back to a Linux box and confirmed = that I don't get the behavior there. For now I'm sticking with the 'stty columns 250 ; telnet foo' solution. Miguel ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Expectperl-discuss mailing list Exp...@li... https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |