This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Can't call expect from a Cygwin shell script.
- From: "Damo, David" <David dot Damo at CIBC dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Thu, 14 Jan 2010 08:42:27 -0500
- Subject: Can't call expect from a Cygwin shell script.
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."
Thanks,
David ï