delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/14/09:02:57

X-Recipient: archive-cygwin AT delorie DOT 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 DOT Damo AT CIBC DOT com>
To: Jeremy Bopp <jeremy AT bopp DOT net>, "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT 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 AT CBMCC-X7-MBX10 DOT ad DOT cibc DOT com> <4B4F20BE DOT 9040908 AT bopp DOT net>
In-Reply-To: <4B4F20BE.9040908@bopp.net>
MIME-Version: 1.0
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

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 AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of=
 Jeremy Bopp
Sent: Thursday, January 14, 2010 8:49 AM
To: cygwin AT cygwin DOT 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

- Raw text -


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