From: Roland G. <Ro...@Gi...> - 2003-05-01 21:18:17
|
Hmm, well I can confirm from my experience that solaris ptys are somewhat broken in many regards. But this doesn't help you. :-) What comes to mind is to circumvent ptys completely. Have you considered using Net::Telnet instead of spawning a telnet program? Hope this helps, Roland Miguel wrote: > Summary > ------- > Problem with horizontal line-wrap when spawning telnet on SunOS 5.8. > How do I turn off this 'feature' of solaris in a portable way? > > Detail > ------ > I developed some perl code which uses Expect on a linux box. The script > spawns telnet to talk to a cisco router. I encountered a problem when I > moved the script to a Solaris box (where I don't have much operational > experience). > > When I $exp->send(a-line-of-text-which-is-very-long) then the echoed > results has lots of backspaces in it. I can see this behavior when I run > Solaris telnet from the command line ... rather than wrapping to the > next line the telnet is (apparently) doing me the 'favor' of wrapping > the text on the same line. The result is that my script is broken. > > I tried setting $exp->raw_tty(1) ... no joy > > I tried $exp->spawn('COLUMNS=250 ; telnet foo') ... no joy ... although > this does work from the command line > > I tried $exp->spawn('TERM=dumb ; telnet foo') ... no joy ... although > this does work from the command line > > I didn't see anything in the man page > > I searched the web and found a few people complaining, but did not see a > fix. > > bash has a similar feature. I saw one person complaining that bash was > broken was doing this to him on his Solaris system. I suspect that this > may have been a case of Solaris doing it to him. > > Any suggestions? > > Thanks in advance for your help. > > 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 > > |