[lug] "expect" or something similar?

Chip Atkinson chip at circadence.com
Thu Dec 13 08:57:48 MST 2001


I have had good experience with both as well.  Expect is an excellent
choice.  I like it quite a bit because it comes with autoexpect, which is
an expect program that captures your keystrokes and puts them into an
expect program.  This then forms the basis for your final script.  I say
this because things like logging in often have variable output and the
autoexpect program makes an expect script that expects *exactly* the
output received.  Even so, it gets you about 85% of the way there.

Chip

On Wed, 12 Dec 2001, dan radom wrote:

> i recently went through the process of rewriting all my expect scripts
> in perl using Expect.pm.  They ran much faster, and caused fewer
> problems in general.  i'd be happy to provide a few examples of both
> perl and straight expect scripts if you'd like.
>
> dan
>
> * Bryan Field-Elliot (bryan_lists at netmeme.org) wrote:
> > I need to write a shell script, which executes another program (ssh,
> > actually), answer a few questions on the behalf of the user (wait for X,
> > send x, then wait for Y, send y, etc.), and finally, turn control of the
> > program over to the user for real.
> >
> > Is the "expect" program the right way to do this? Or is there some other
> > more recommended approach?
> >
> > Thanks in advance,
> >
> > Bryan
> >
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>




More information about the LUG mailing list