[nzlug] Telnet in all it's... hmm.... greatness?

Jim Cheetham jim at gonzul.net
Tue Jun 10 11:02:09 NZST 2008


On Tue, Jun 10, 2008 at 10:51 AM, Nevyn <nevynh at gmail.com> wrote:
> So it's communication one way. I would like it to be able to get the
> status of ADSL before attempting to connect PPP, to be able to then
> check to see if the PPP status has changed at all and if it hasn't to
> try something else. Is there anyway to process the output of a telnet
> session run in this way?

Use expect.

Either with the command-line expect tool, which uses TCL as its
programming language (i.e. you'll be doing a lot of copying other
scripts for a while!) or as a library in some other language like perl
or python, as you wish.

This sort of thing is just what expect is written for :-)

-jim



More information about the NZLUG mailing list