delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/30/08:40:26

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: Michael Beach <michaelb AT ieee DOT org>
To: C Wells <s2audi AT yahoo DOT com>, cygwin AT cygwin DOT com
Subject: Re: expect help on cygwin
Date: Tue, 30 Jul 2002 22:16:17 +1000
References: <20020729184512 DOT 94555 DOT qmail AT web20512 DOT mail DOT yahoo DOT com>
In-Reply-To: <20020729184512.94555.qmail@web20512.mail.yahoo.com>
MIME-Version: 1.0
Message-Id: <02073022161700.01221@xerxes>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g6UCeQL22309

Well, this is more of a workaround than a fix, but have you considered using 
Expect.pm ie the Perl Expect module instead of the original Tcl based expect? 
It reputedly can do pretty much everything that expect can do, and I *know* 
it works under cygwin because I use it there quite extensively. Plus you get 
to use Perl rather than (gag!) Tcl.

Find it on CPAN, or at http://sourceforge.net/projects/expectperl/.

Regards
M.Beach

On Tuesday 30 July 2002 04:45, C Wells wrote:
> Anyone with expect experience on cygwin that can help
> me, I will compensate with a $25 gift certificate to
> Amazon.
> Thanks
>
> --- C Wells <s2audi AT yahoo DOT com> wrote:
> > 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/
>
> __________________________________________________
> 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/

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019