This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: /usr/bin/env - Incorrect parsing of #! line?
- From: "David Gluss" <dgluss at marple-tech dot com>
- To: <cygwin at cygwin dot com>,"Peter J. Acklam" <pjacklam at online dot no>
- Date: Tue, 12 Feb 2002 11:55:47 -0800
- Subject: Re: /usr/bin/env - Incorrect parsing of #! line?
- References: <8z9y4kbm.fsf@online.no>
I don't know if it's constructive to suggest an alternative trick, rather
than trying to fix cygwin, in this forum. However, this might work
for you:
>------------
>: # -*-Mode: perl;-*- use perl, wherever it is
>eval 'exec perl -wS $0 ${1+"$@"}'
> if 0;
>#!/usr/local/bin/perl -w
>------------
DG
----- Original Message -----
From: "Peter J. Acklam" <pjacklam@online.no>
To: <cygwin@cygwin.com>
Sent: Tuesday, February 12, 2002 10:38 AM
Subject: /usr/bin/env - Incorrect parsing of #! line?
> I use different computers where Perl is installed different
> places, so I can't hardcode the location of perl in the shebang
> line. Thus, I use env, which works great on all UNIXes I work on,
> for instance
>
> #!/usr/bin/env perl -w
>
> print "This is Perl version $]\n";
>
> but on Cygwin I get
>
> /usr/bin/env: perl -w: No such file or directory
>
> why does Cygwin look for the file "perl -w". No UNIX I have
> worked on would parse the shebang line that way.
>
> Peter
>
> --
> People say I'm indifferent, but I don't care.
>
>
> --
> 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/
>
--
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/