Re: How to quit telnet session using expect?

From: Franklin Li (pengtaoli_at_hotmai.com)
Date: 01/19/05

  • Next message: Franklin Li: "How to know one telnet session dead in Expect script?"
    Date: Wed, 19 Jan 2005 09:22:02 +0800
    
    

    Hi John,

    It should be a "telnet>", but it's not there. It's no reponse, only a
    prompt. I find that Solaris use '^]', not as normal escapechar '^['. I want
    to know the root cause for this.

    Certainly I can use "exit". But some time, for example, I send one wrong
    passwd and I can't use "exit" to quit that telnet session.

    Thanks.

    Franklin
    "John Zwiebel" <jzwiebel@cisco.com> wrote in message
    news:41ED3001.30408@cisco.com...
    > Franklin Li wrote:
    > > Hi All,
    > >
    > > I'm writing the Expect script on Solaris.
    > > In my script I defined the variable: set escapechar \033.
    > > When I want to quit telnet session, I use exp_send "$escapechar".
    > > But I find it doesn't work.
    > >
    > > So could you tell me the reason or told me how to resolve it?
    > >
    > > Thanks.
    > >
    > > Franklin
    > >
    > >
    >
    > Could it be that escape by itself does not quit telnet
    > but only gives you a "telnet>" prompt?
    >
    > But why would you want to quit that way? Wouldn't it be
    > better to get a remote prompt and then "exit"?


  • Next message: Franklin Li: "How to know one telnet session dead in Expect script?"