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]

/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.
> > Linux parses things this way too. I don't know what "UNIX"'s this works
> on.
> > (Sun, HP?)
More specifically it's a quoting issue.
Try:
/usr/bin/env perl -w
on the command line and compare with
"/usr/bin/env perl -w"

Regards
Chris

 
> 


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