This is the mail archive of the cygwin@cygwin.com 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: /usr/bin/env - Incorrect parsing of #! line?


hammond@csc.albany.edu (William F. Hammond) writes:

> I don't understand why you want to use /usr/bin/env
> under Cygwin.

The reason is portability.  I have written hundreds of
Perl utilities which I find extremely useful and I
want them to run smoothly both on UNIX and cygwin.
I really hesitate to maintain one set of utilities for
cygwin, one for Solaris, one for HP-UX, etc.

> Not everything that makes sense under *ix makes sense
> for Cygwin.

I know, but cygwin respects shebang lines (e.g., a text
file in the path starting with the line "#!/bin/gawk"
will really be run by gawk), so I'm sure there is a way
to get this working right.  I just haven't found it yet.

> Presumably one runs Cygwin because one does not want
> to run Linux so that one can have simultaneous single
> platform access to Win* things and Gnu things familiar
> in *ix contexts.

Yep.

> That said, doesn't it then make sense to use a straight
> Win* build for perl so that perl can be used in Win*
> mode?

I have tried, and I found out that a Win* build of Perl
doesn't integrate well with cygwin.

> Granted that -- and granted the desire to build
> environment outside of the Perl script itself -- one
> may use either a bat file or an sh script, as appropriate
> for the calling context, to create the needed environment.

True, that works, I have tried, but then I need a whole
set of bat files and sh files in addition to the original
Perl scripts and that's what I am trying to avoid.  :-)

Thanks for your input!

Peter


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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]