the #! notation
Chris Lewis
clewis at ferret.ocunix.on.ca
Thu Jan 24 16:18:33 AEST 1991
In article <1991Jan23.044019.4807 at NCoast.ORG> allbery at ncoast.ORG (Brandon S. Allbery KB8JRR) writes:
|As quoted from <587 at fciva.FRANKCAP.COM> by dag at fciva.FRANKCAP.COM (Daniel A. Graifer):
|+---------------
|| Perhaps I've missed something here, but none of this #! stuff works on my
|| machine (running Sys V/386 3.1). Is this something that only works in
|| BSD-derived unixes? What about V3.2 or V4?
|+---------------
|It's a BSD-ism (and requires some kernel hacks to implement).
|Note that some shells can emulate this mechanism when the kernel doesn't
|support it --- I think bash does, for instance, and I have posted my "bexec"
|mechanism for making any System V csh do so many times.
Certain "stock" C-shells do it too. I believe that BSD C shell manages
to recognize the "#" versus non-"#" prolog and attempts to do the right
thing as a short-cut. Other C-shells too, for example, some flavours
of Xenix do it in the C-shell because there are no hooks in the kernel.
--
Chris Lewis, Phone: (613) 832-0541, Internet: clewis at ferret.ocunix.on.ca
UUCP: uunet!mitel!cunews!latour!ecicrl!clewis
Moderator of the Ferret Mailing List (ferret-request at eci386)
More information about the Comp.unix.shell
mailing list