Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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 Reply-To: cygwin AT cygwin DOT com To: Robert R Schneck cc: cygwin AT cygwin DOT com Subject: Re: Fun with #! (aka shebang) and filenames ending in .exe In-Reply-To: Message-ID: References: <62148 DOT 24 DOT 126 DOT 73 DOT 164 DOT 1080436603 DOT squirrel AT webmail4 DOT pair DOT com> <6 DOT 0 DOT 1 DOT 1 DOT 0 DOT 20040328135645 DOT 02865c58 AT 127 DOT 0 DOT 0 DOT 1> <40672AF0 DOT 7030506 AT kegel DOT com> 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 wrote: > > 'Ware of this issue: > > > > > > 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. > > > > 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 AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT 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/