Path: utzoo!utgpu!cunews!micor!latour!ecicrl!clewis From: clewis@ferret.ocunix.on.ca (Chris Lewis) Newsgroups: comp.unix.shell Subject: Re: the #! notation Message-ID: <1198@ecicrl.ocunix.on.ca> Date: 24 Jan 91 05:18:33 GMT References: <1991Jan21.174803.6661@mp.cs.niu.edu> <16209@burdvax.PRC.Unisys.COM> <587@fciva.FRANKCAP.COM> <1991Jan23.044019.4807@NCoast.ORG> Distribution: na Organization: Elegant Communications Inc., Ottawa, Canada Lines: 22 In article <1991Jan23.044019.4807@NCoast.ORG> allbery@ncoast.ORG (Brandon S. Allbery KB8JRR) writes: |As quoted from <587@fciva.FRANKCAP.COM> by dag@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@ferret.ocunix.on.ca UUCP: uunet!mitel!cunews!latour!ecicrl!clewis Moderator of the Ferret Mailing List (ferret-request@eci386)