This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Can't call expect from a Cygwin shell script.


No errors. :( Just does not run from the shell script when called from the JSP, however the script works when called from command prompt. This same configuration works in UNIX. We need to call expect from the shell script through the JSP to capture the output.

David

-----Original Message-----
From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of Jeremy Bopp
Sent: Thursday, January 14, 2010 8:49 AM
To: cygwin@cygwin.com
Subject: Re: Can't call expect from a Cygwin shell script.

Damo, David wrote:
> Hi,
> 
> I am trying to use Cygwin to launch expect from a simple shell script. In my case I am launching the shell script from a JSP, and the shell script gets called properly, however I can do everything from the shell script but call expect. For example touch ls, pwd, cd, echo all work, but expect does not. I tried specifying the full path to expect and going into /usr/bin and running expect as ./. My TERM is now set to VT100 and my CYGWIN variable is the default. Here is the shell script. Any ideas? What is also interesting is if I run the shell script both from the cmd or cygwin.bat it works, but does not work from the shell script.
> 
> Everything works but the expect command:
> 
> #!/bin/sh
> 
> echo `date`  " - Starting shell script."
> 
> touch /apps/sjsws/sunws-automation/https-autodemo.com/docs/runshell
> 
> #echo `date` " - Copy properties file."
> 
> #file=`basename $6`
> 
> #echo `date` " - Run build on: " $file
> 
> 
> expect /apps/sjsws/sunws-automation/https-autodemo.com/docs/jdk/RunJDKInstall.exp $1 $2 $3 $4
> 
> #expect /cygdrive/d/apps/https-game-automation/docs/jdk/RunJDKInstall.exp 1 $2 $3 $4
> 
> 
> echo `date`  " - Finished."

What exactly is the error when expect is called in the failing
configuration?

-Jeremy

-Jeremy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]