[lug] expect, autoexpect...

Chip Atkinson chip at rmpg.org
Mon Jun 12 16:22:22 MDT 2000


Do you do a "send -- exit", or just "exit"?  If you do the former, then it
will exit the process that it's connecting to, whereas just a plain exit
exits the autoexpect.

For the periodic running, cron is your pal.  
crontab -e puts you into an editor to add entries.  Add an entry of the
format
# minute, hour, day of month, month, day of week command
For example,

59 1 * * * /usr/bin/rdate -s tock.usno.navy.mil

Sets the system clock at 1:59 am.

Chip

On Mon, 12 Jun 2000, Andrew Reberry wrote:

> I am writing an expect file to post my current IP address on a webpage so I can telnet to my machine when my IP changes.  I am having 2 small problems though:
> 
> 1) Whenever I type 'exit' to exit from ftp, telnet or anything else, expect thinks I'm telling it to exit.  Anyone know a way around this?  All works fine until I run the expect script, then when the script gets to the 'exit' point expect stops running completely.    I don't want to kill my ftp connection with a CTRL-Z because that will hang my web host for a few minutes on me, wont it?
> 
> 2) How can I set my expect file to run every half hour or so?
> 
> Thanks
> 
> Andrew Reberry
> 





More information about the LUG mailing list