Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
X-Apparently-From: <earnie?boyd@yahoo.com>
Message-ID: <3A635A1C.40484FFE@yahoo.com>
Date: Mon, 15 Jan 2001 15:14:20 -0500
From: Earnie Boyd <earnie_boyd@yahoo.com>
Reply-To: Earnie Boyd <cygwin@cygwin.com>
X-Mailer: Mozilla 4.76 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: "Larry Hall (RFK Partners, Inc)" <lhall@rfk.com>
CC: Earnie Boyd <cygwin@cygwin.com>, Michael Yorg <myorg@extensity.com>
Subject: Re: Running .bat files from CYGWIN
References: <4.3.1.2.20010115124313.023299b8@pop.ma.ultranet.com> <4.3.1.2.20010115135445.022266d8@pop.ma.ultranet.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

"Larry Hall (RFK Partners, Inc)" wrote:
> 
> At 01:50 PM 1/15/2001, Earnie Boyd wrote:
> >
> >Create a noop program named #!.exe and put it in command.com/cmd.exe
> >PATH.
> >Then at the top of your .bat file put
> >   #! c:\\path\\to\\cmd.exe /c
> >and this will cause Cygwin to think it's executable and execute it.
> >
> 
> Right but these batch files won't run from cmd.exe/command.com like this
> though.  Still, its a way to "convert" batch files to run under the Cygwin
> shells if you don't need them to run under cmd.exe/command.com anymore.
>

Huh.  Of course they will continue to work under cmd.exe/command.com, if
not, they wouldn't work under Cygwin shells either.  It's the reason you
create a noop program named `#!.exe'.  The cmd.exe/command.com shells
actually execute the program which does nothing more than return 0.
 
>
> The reason I directed the poster to the email archives is I seem to
> remember that there was also some way to get bash/sh to run batch files
> directly, without invoking the cmd.exe/command.com explicitly (i.e. one
> could just type b.bat at the sh/bash prompt).  I don't remember the details
> though (which is the part that would be in the email archives for those
> interested in looking!;-))  And actually, for me, this works.  YMMV and
> don't ask me why it works for me!;-)
> 

Well, I certainly don't remember anything beyond what you suggested.  I
have posted my #!.exe noop program solution before, but it's been a
while so I thought it was time to repeat myself.

Cheers,
Earnie.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

