Tags: break, cases, casue, control, device, error, expect, handle, myscript, programming, remote, script, session, tcl, telnet, via

Expect Telnet Error Handle?

On Programmer » TCL

1,115 words with 1 Comments; publish: Wed, 07 May 2008 13:14:00 GMT; (200138.67, « »)

I have a script to control remote device via Telnet using Expect. But,

in some cases, the Telnet session would break. This would casue my

script terminated. Is there any method to take care of that? I mean, If

there is any method that I can detect the broken and make it connect

again? I am running TCL 8.4 with Expect 5.xx.

Eric Lin

All Comments

Leave a comment...

  • 1 Comments
    • In article <1144648733.028889.192140.tcl-program.todaysummary.com.j33g2000cwa.googlegroups.com>,

      Eric Lin <h05558.tcl-program.todaysummary.com.gmail.com> wrote:

      >I have a script to control remote device via Telnet using Expect. But,

      >in some cases, the Telnet session would break. This would casue my

      >script terminated. Is there any method to take care of that? I mean, If

      >there is any method that I can detect the broken and make it connect

      >again? I am running TCL 8.4 with Expect 5.xx.

      >Eric Lin

      >

      1. Get the book.

      2. In what sense does "the Telnet session ... break"? Does

      it exit? Do you lose a network connection? ...

      3. You'll probably want to learn about at least one of

      {timeout} and {eof}.

      #1; Wed, 07 May 2008 13:15:00 GMT