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 

Reply via email to