[Linux-users] any 'expect' gurus?

Lonni J Friedman netllama
Wed Aug 15 16:58:16 PDT 2007


I'm trying to use expect for the first time to automate the
installation of a '.run' package which lacks a silent or automated
installation option.

I used autoexpect to generate the expect script.  It works fine if I
run it on a specific system, however trying to run it on any other
system where the user running the script is not a known variable
results in strange behavior.  The problem appears to be that
autoexpect captured my shell prompt as part of its content, and since
that prompt differs from one system (and distro) to another, it no
longer gets the match its expecting.

The odd thing is that the script still works, except it never exits
cleanly at the end, and instead hangs until I manually kill it.

The man page talks about an 'exit' directive, but that doesn't seem to
work for me, when I append it to the end of the expect script.  There
are also a few references to using wildcards, but I don't see how to
define them.  Anyone been down this road before?

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                                    netllama at gmail.com
LlamaLand                       http://netllama.linux-sxs.org



More information about the Linux-users mailing list