From: Miguel <mt...@mt...> - 2003-05-01 18:42:38
|
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 |