delorie.com/archives/browse.cgi | search |
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 |
Date: | Fri, 30 Mar 2001 17:46:07 -0500 (EST) |
From: | Jan Vicherek <cygwin-user AT ied DOT com> |
To: | "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com> |
cc: | Andrew Markebo <flognat AT flognat DOT myip DOT org>, Earnie Boyd <cygwin AT cygwin DOT com> |
Subject: | Re: Batch files |
In-Reply-To: | <4.3.1.2.20010330151830.020e9b40@pop.ma.ultranet.com> |
Message-ID: | <Pine.LNX.4.21.0103301738200.14975-100000@ann.ied.com> |
MIME-Version: | 1.0 |
Hmm, executing "foo.bat" works even without performing the three steps below, but executing "foo" (where "foo.bat" is in the path), doesn't work even if "#!.exe" is present ! : administrator AT BM80258908 /c $ echo $PATH /c/temp:.:/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/bin:/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/c/vim/vim57 administrator AT BM80258908 /c $ foo.bat c:\>echo test works ! test works ! administrator AT BM80258908 /c $ foo bash: foo: command not found I presume that in order to make the three steps of the effect that executing just "foo" will work, there is a prerequisite, right ? Earnie, what would this prerequisite be ? thanx Jan > >/ 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 -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |