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
To: cygwin@cygwin.com
From: Robert R Schneck <schneck@math.berkeley.edu>
Subject: Re: Fun with #! (aka shebang) and filenames ending in .exe
Date: Mon, 29 Mar 2004 13:03:48 +0000 (UTC)
Lines: 17
Message-ID: <c496rj$sdb$1@sea.gmane.org>
References: <62148.24.126.73.164.1080436603.squirrel@webmail4.pair.com> <6.0.1.1.0.20040328135645.02865c58@127.0.0.1> <40672AF0.7030506@kegel.com> <Pine.GSO.4.56.0403281820390.18236@slinky.cs.nyu.edu>
X-Complaints-To: usenet@sea.gmane.org
X-Gmane-NNTP-Posting-Host: 80.44.149.159
User-Agent: slrn/0.9.8.0 (CYGWIN_NT-5.1)

Igor Pechtchanski <pechtcha@cs.nyu.edu> wrote:
> 'Ware of this issue:
>
> <QUOTE from http://cygwin.com/cygwin-ug-net/using-specialnames.html#AEN846>
>   If a shell script myprog and a program myprog.exe coexist in a
>   directory, the program has precedence and is selected for execution of
>   myprog.
> </QUOTE>

The original poster was actually pointing out a different issue:
If the shell script itself is named myprog.exe, it is executed as
a Windows executable rather than as a shell script.  

It would be nice if the file could be checked for beginning with "#!",
but perhaps the only real solution is Don't Do That, Then.

Robert


--
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/

