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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Mon, 29 Mar 2004 08:42:49 -0500 (EST)
From: Igor Pechtchanski <pechtcha@cs.nyu.edu>
Reply-To: cygwin@cygwin.com
To: Robert R Schneck <schneck@math.berkeley.edu>
cc: cygwin@cygwin.com
Subject: Re: Fun with #! (aka shebang) and filenames ending in .exe
In-Reply-To: <c496rj$sdb$1@sea.gmane.org>
Message-ID: <Pine.GSO.4.56.0403290841090.18236@slinky.cs.nyu.edu>
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> <c496rj$sdb$1@sea.gmane.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Scanned-By: MIMEDefang 2.39

On Mon, 29 Mar 2004, Robert R Schneck wrote:

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

Yes, and that had been addressed by Larry already.  I was just commenting
on the "my scripts now strip the .exe extension" part of the OP's reply.

> 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

AFAIU, it's a shortcut to let Windows do what it will with the known
executable types (.exe/.com).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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

