Re: #! syntax
Hola~
The problem I found with env was that the shell incorrectly passes args to
env:
% head -1 t348.sh
#! /usr/bin/env perl -w
% ./t348.sh
env: perl -w: No such file or directory
How does one get around this? Please don't say, "Don't use perl."
MO
>-- On Mon, Feb 26, 2001 at 04:49:05PM +0000, % wrote:
> Quoting Anthony Fox (ant@lonelyroad.org):
> > "Michael O'Brien" <mobrien@pixar.com> writes:
>
> > > Is there any way to have a #! syntax that will conditionally run a
> > > interpreter based on a set of fallback locations?
> > >
> > > For example, we have a perl install in /dir/bin/perl. However, if
> > > you are at a non-work machine (ie, at home), you may not have a
> > > /dir/bin/perl. So, I'd like to have a script that will first try
> > > /dir/bin/perl, then if that doesn't exist, tries /usr/bin/perl.
>
> I missed the original posting. I have a similar problem with
> perl, python etc. at work on a Sun. My solution is to put
> #!/usr/bin/env python
> on all my scripts, in place of
> #!/usr/bin/python
> because their python is in /usr/local/bin.
>
> Cheers,
>
> --
> Email: d.wright@open.ac.uk Tel: +44 1908 653 739 Fax: +44 1908 655 151
> Snail: David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
> Disclaimer: These addresses are only for reaching me, and do not signify
> official stationery. Views expressed here are either my own or plagiarised.
>
>
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
--
Michael O'Brien Tools
Pixar mobrien@pixar.com
VIZZINI: You fell victim to one of the classic blunders. The most famous is
never get involved in a land war in Asia. But only slightly less
well-known is this: never go in against a Sicilian when death is on
the line. Ha ha ha ha ha ha. Ha ha ha ha ha--
Reply to: