delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/30/19:11:53

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-Id: <4.3.1.2.20010330151830.020e9b40@pop.ma.ultranet.com>
X-Sender: lhall AT pop DOT ma DOT ultranet DOT com
X-Mailer: QUALCOMM Windows Eudora Version 4.3.1
Date: Fri, 30 Mar 2001 15:20:39 -0500
To: Andrew Markebo <flognat AT flognat DOT myip DOT org>, Earnie Boyd <cygwin AT cygwin DOT com>
From: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
Subject: Re: Batch files
In-Reply-To: <m3g0fv2f4o.fsf@master.athome>
References: <3AC4E2E8 DOT 36A22AF0 AT yahoo DOT com>
<5 DOT 0 DOT 2 DOT 1 DOT 2 DOT 20010330170402 DOT 042f8150 AT mailhost>
<4 DOT 3 DOT 1 DOT 2 DOT 20010330121322 DOT 020d15b0 AT pop DOT ma DOT ultranet DOT com>
<3AC4E2E8 DOT 36A22AF0 AT yahoo DOT com>
Mime-Version: 1.0

Been there, done that!  I'm having quite a bit of deja-vu relative to this
particular solution.

Earnie suggested making an executable called #!.exe  If this is done, then
you can expect the batch file to grok it if its in the path.

Larry Hall                              lhall AT rfk DOT com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



At 03:09 PM 3/30/2001, Andrew Markebo wrote:
>Will cmd still grokk the batch-file if you have a #! on the first
>line??
>
>         /Andy
>
>/ Earnie Boyd <earnie_boyd AT yahoo DOT com> wrote:
>| "Larry Hall (RFK Partners, Inc)" wrote:
>| > 
>| > At 11:17 AM 3/30/2001, Matt Minnis wrote:
>| > 
>| > >Is there a way to get Cygwin to recognize that *.bat files are executeable as:
>| > >fred.bat & fred (without the .bat)?
>| > 
>| > Anything's possible.  foo.bat works for me though.
>| > 
>| 
>| Hmm...  This isn't a FAQ yet?!
>| 
>| I've explained many times how to do this. 
>| 
>| 1) Create a noop program named #!.exe
>| 2) Install the it in C:/cygwin/bin and C:/windows/system32/
>| 3) Add `#! c:/windows/system32/cmd /c' to the .bat file as the first
>| line.
>| 
>| Earnie.
>| 
>| P.S.:
>| 
>| cat << EOD > noop.c
>| int main (void) {return 0;}
>| EOD
>| gcc -o \#\!.exe noop.c
>| 
>| _________________________________________________________
>| 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
>
>--
>Want to unsubscribe from this list?
>Check out: http://cygwin.com/ml/#unsubscribe-simple


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

- Raw text -


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