This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fun with #! (aka shebang) and filenames ending in .exe


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]