This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Running .bat files from CYGWIN


On Mon, Jan 15, 2001 at 03:14:20PM -0500, Earnie Boyd wrote:
>"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.

Indeed, it sounds like a clever solution to the problem.

cgf

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]