X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-0.5 required=5.0 	tests=AWL,BAYES_00,SARE_SPEC_LEO_DOLLARSa,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
From: "Damo, David" <David.Damo@CIBC.com>
To: Jeremy Bopp <jeremy@bopp.net>, "cygwin@cygwin.com" <cygwin@cygwin.com>
Date: Thu, 14 Jan 2010 09:01:44 -0500
Subject: RE: Can't call expect from a Cygwin shell script.
Message-ID: <EDF49EC9787F914CA157FF6927D65A8830262D2007@CBMCC-X7-MBX10.ad.cibc.com>
References: <EDF49EC9787F914CA157FF6927D65A8830262D1FCF@CBMCC-X7-MBX10.ad.cibc.com>  <4B4F20BE.9040908@bopp.net>
In-Reply-To: <4B4F20BE.9040908@bopp.net>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

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 co=
nfiguration works in UNIX. We need to call expect from the shell script thr=
ough 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,
>=20
> 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 g=
ets 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 i=
s the default. Here is the shell script. Any ideas? What is also interestin=
g is if I run the shell script both from the cmd or cygwin.bat it works, bu=
t does not work from the shell script.
>=20
> Everything works but the expect command:
>=20
> #!/bin/sh
>=20
> echo `date`  " - Starting shell script."
>=20
> touch /apps/sjsws/sunws-automation/https-autodemo.com/docs/runshell
>=20
> #echo `date` " - Copy properties file."
>=20
> #file=3D`basename $6`
>=20
> #echo `date` " - Run build on: " $file
>=20
>=20
> expect /apps/sjsws/sunws-automation/https-autodemo.com/docs/jdk/RunJDKIns=
tall.exp $1 $2 $3 $4
>=20
> #expect /cygdrive/d/apps/https-game-automation/docs/jdk/RunJDKInstall.exp=
 1 $2 $3 $4
>=20
>=20
> 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

