Re: share/, etc/, lib/ & al. (fwd)

Ben Elliston (bje@cygnus.com)
Sat, 10 Oct 1998 10:05:41 +1000 (EST)


Is there any chance that this enhancement could be made to the Linux
kernel? That is, that the user's PATH is searched for an interpreter when
an absolute path isn't given?

Ben

---------- Forwarded message ----------
Date: Fri, 9 Oct 1998 12:46:30 -0700 (PDT)
From: Martin Buchholz <martin@xemacs.org>
To: "Joel N. Weber II" <devnull@gnu.org>
Cc: verna@inf.enst.fr, autoconf@gnu.org
Subject: Re: share/, etc/, lib/ & al.
Resent-Date: Fri, 9 Oct 1998 15:53:58 -0400
Resent-From: autoconf@gnu.org

>>>>> "J" == Joel N Weber <devnull@gnu.org> writes:

J> People need to keep in mind that perl scripts such as automake
J> generally are *not* machine independent; last I checked, automake has
J> the absolute filename put in the first line of the executable
J> script...

This is because people don't understand about writing portable perl
scripts. Start them all off this way:

: #-*- Perl -*-
eval 'exec perl -w -S $0 ${1+"$@"}' # Portability kludge
if 0;

Of course, there's a performance penalty, but that's life.

Unix should have been designed so that the kernel would do PATH
searching and scripts could start with

# perl -w

and the above hack would not be necessary.

J> IMHO, the only truely machine-independent shell scripts are the ones
J> that use /bin/sh.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/