Messages in this thread | | | Date | Sun, 21 Mar 1999 09:48:28 -0500 | From | Ben Collins <> | Subject | Re: #!perl - alternative path to script interpreters - patch to 2.2 |
| |
On Sun, Mar 21, 1999 at 09:31:41AM -0500, John Kodis wrote: > On Sun, Mar 21, 1999 at 09:05:57AM -0500, Alexander Viro wrote: > > > On Sun, 21 Mar 1999 jb@heva.net.pl wrote: > > > > > > Current semantics requires to specify complete path to interpreter > > > program in the first line of script after #!. It is ok as long > > > scripts are used in the same system. In different distribution or > > > under different OS specified path is useless. > > > > Under different OS you will not have your hack in the kernel, so > > your solution has *less* chances to work there (zero, to be precise). > > That's currently true, but the same line of reasoning can be used to > argue against pretty much any additional capability. This mod, if > adopted in the main Linux kernel, would make scripts more portable > between different Linux installations, and is simple enough that would > likely be quickly adopted elsewhere.
Perhaps for the sake of portability the best way to approach it would be:
#!/usr/local/bin/perl5 #!perl <code>
On linux systems with this support, /usr/local/bin/perl5 would be checked first, if it isn't there then it looks for relative interpreters for `perl'. This would make your hack more backward compatible.
-- ----- -- - -------- --------- ---- ------- ----- - - --- -------- Ben Collins <b.m.collins@larc.nasa.gov> Debian GNU/Linux OpenLDAP Core - bcollins@openldap.org bcollins@debian.org UnixGroup Admin - Jordan Systems The Choice of the GNU Generation ------ -- ----- - - ------- ------- -- ---- - -------- - --- ---- - --
- 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/
| |