delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/14/08:49:22

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_SPEC_LEO_DOLLARSa
X-Spam-Check-By: sourceware.org
Message-ID: <4B4F20BE.9040908@bopp.net>
Date: Thu, 14 Jan 2010 07:48:46 -0600
From: Jeremy Bopp <jeremy AT bopp DOT net>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Can't call expect from a Cygwin shell script.
References: <EDF49EC9787F914CA157FF6927D65A8830262D1FCF AT CBMCC-X7-MBX10 DOT ad DOT cibc DOT com>
In-Reply-To: <EDF49EC9787F914CA157FF6927D65A8830262D1FCF@CBMCC-X7-MBX10.ad.cibc.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

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

- Raw text -


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