| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| From: | "D. N. Knisely" <dnk AT lucent DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | RE: expect help on cygwin |
| Date: | Tue, 30 Jul 2002 13:47:56 -0500 |
| Message-ID: | <LOEFIDOJKFHHHOOHLIHJAEKKCIAA.dnk@lucent.com> |
| MIME-Version: | 1.0 |
| X-Priority: | 3 (Normal) |
| X-MSMail-Priority: | Normal |
| Importance: | Normal |
| X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
| In-Reply-To: | <20020728165046.6438.qmail@web20511.mail.yahoo.com> |
Your script works just fine for me (simply modified to telnet to a local
host). I also use expect with SSH every day with no problems (well, it is a
little quirky sometimes, but basic "spawn" functionality works. My ssh
script is a bit more complex, and it works.
I am using this version:
$ expect -v
expect version 5.26
CYGWIN DLL version is 1.3.12. OS is Windows XP Pro.
D. Knisely
-----Original Message-----
From: C Wells [mailto:s2audi AT yahoo DOT com]
Sent: Sunday, July 28, 2002 11:51 AM
To: cygwin AT cygwin DOT com
Subject: expect help on cygwin
After giving up on trying to get autoexpect to run I
decided I would try a basic expect script
#!/usr/bin/expect -f
spawn telnet 1.2.3.4
# I tried spawn telnet "1.2.3.4" with no good result
expect "login:"
send "uid\r"
expect "word:"
send "pass\r"
interact
Pretty basic, but it won't work. Obviously the spawn
telnet calls MS's telnet client, but this is the error
msg....
$ ./login.exp
spawn telnet 1.2.3.4
send: invalid spawn id (4)
while executing
"send "uid\r""
(file "./login.exp" line 5)
I tried the expect cmd line and it seems maybe it
doesn't like the \r, maybe there is another way to
send a return ? Can anyone help me ?
Thanks
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |