#! loader convention
Ronald S H Khoo
ronald at robobar.co.uk
Thu Apr 18 18:49:43 AEST 1991
gwyn at smoke.brl.mil (Doug Gwyn) writes:
> pauld at cs.washington.edu (Paul Barton-Davis) writes:
> >I believe that the convention of interpreting #! comments in
> >"scripts" is built in the loader for BSD. Does anyone know
> >if any such mechanism exists at the same level in System V ?
> It's handled by code in the kernel (part of the exec() system call).
> SVR4 is supposed to support this.
And if you're running System V releases previous to 4, you can
get *some* of the functionality of #! by using a shell that
emulates it for you, e.g. ash (comp.sources.unix archives somewhere).
And, for at least some of the csh's that some System V(<R4) vendors
provide, you can say set shell=/usr/bin/perl to get if you also have a
reasonably recent perl.
But doing this sort of thing does lead to a rather inconsistent system,
so I don't recommend it.
--
Ronald Khoo <ronald at robobar.co.uk> +44 81 991 1142 (O) +44 71 229 7741 (H)
More information about the Comp.unix.questions
mailing list