Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Reply-To: <davemc@mcpond.co.nz>
From: "David McNeill" <davemc@mcpond.co.nz>
To: <cygwin@cygwin.com>
Subject: FW: Does anyone know how to invoke a bash process via a dos batch program so commands after bash execute?
Date: Tue, 13 Apr 2004 13:35:19 +1200
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <MCDAMsW6qsys8ra06b800000014@mcpond.co.nz>
X-OriginalArrivalTime: 13 Apr 2004 01:34:44.0437 (UTC) FILETIME=[7FAE8050:01C420F7]
X-IsSubscribed: yes

You want CALL

Call batch2.bat


-----Original Message-----
From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of
Matthew O. Persico
Sent: Tuesday, 13 April 2004 1:17 p.m.
To: cygwin@cygwin.com
Subject: Re: Does anyone know how to invoke a bash process via a dos batch
program so commands after bash execute?

On Mon, 12 Apr 2004 18:05:15 -0400, "Lipin, Adam"
<Adam.Lipin@morganstanley.com>said:
> Does anyone know how to invoke a bash process via a dos batch
> program so
> commands after bash execute?

'bash' is a red herring in this case. Try this:

batch1.bat:
REM This is batch1.bat
batch2.bat test
echo back from batch2.bat
exit

batch2.bat:
REM this is batch2.bat
echo %1
echo bash
echo %1


When I execute batch1.bat in a DOS window, I never get the echo back from
batch2.bat. Notice I removed the exit from batch2.bat. Methinks that
invoking batch2.bat replaces the current process (in UNIX speak) so that the
rest of batch1.bat is never executed.

And now that I have shown this thread to have no Cygwin content whatsoever,
I think it is time to end it. Or else, we're flame-bait for sure.

--
Matthew



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

