Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Problems with an expect script
- To: tlug@example.com
- Subject: Problems with an expect script
- From: Antony Stace <antony@example.com>
- Date: Wed, 14 Feb 2001 13:08:04 +0900
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=us-ascii
- Reply-To: antony@example.com
- Resent-From: tlug@example.com
- Resent-Message-ID: <i4gCIB.A.8oD.uSgi6@example.com>
- Resent-Sender: tlug-request@example.com
- Sender: antony@example.com
Hi Folks I am having problems with a simple expect script. The contents are xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx #!/usr/bin/expect -f set addy devmachine set user devuser set password PASSWORD spawn telnet -l $user $addy expect "user name:" send "$user\r" expect "password:" send "$password\r" (1) interact (2) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx this works fine. When I want to set up some environment variables and a few other things between (1) and (2), ie [snip] expect "devmachine:" #looking for the command prompt send "resize\r" [snip] the script always logs on ok, then it stalls for about 10 seconds with the message of the day followed by ^[[13;80R after this annoying pause I eventually get the command prompt without any of my commands being run. I have tried putting a sleep 3 between (1) and (2) but it doesnt seem to help. Can someone please suggest how I might fix this. Cheers Tony
Home | Main Index | Thread Index
- Prev by Date: Re: [announcement] 2/16 TLUG "nomikai" meeting
- Next by Date: Re: RH7J and Gnome start menu and configuration vs. 800x600 screen
- Prev by thread: RE: [announcement] 2/16 TLUG "nomikai" meeting
- Next by thread: Sendmail configuration question
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links