Path: utzoo!attcan!uunet!pilchuck!ssc!fyl From: fyl@ssc.UUCP (Phil Hughes) Newsgroups: comp.unix.xenix Subject: Re: "#!" scripts, kernel patches, and Xenix Message-ID: <1458@ssc.UUCP> Date: 14 Sep 88 18:04:34 GMT References: <161@tessera.UUCP> <858@viscous> Organization: Slugland, USA Lines: 25 In article <858@viscous>, rosso@sco.COM (Ross Oliver) writes: | In article <161@tessera.UUCP> jtc@tessera.UUCP (J.T. Conklin) writes: | >Has anyone patched the kernel exec routine to execute interpreter | >files ("#!" scripts)? | | The exec() function executes binaries only. If exec() fails (which | it does on a shell script), then it is up to your shell to decide | what to do. The Bourne shell then executes "sh " The C shell | will look at the first line, and if it starts with "#!", csh executes | the script as "csh ", otherwise, it uses "sh " The | Bourne shell, of course, assumes everything that is not a binary is | a Bourne shell script. | | Ross Oliver | SCO Technical Support | uunet!sco!rosso I take it to mean that, at least, SCO hasn't. Also, csh only looks for the #, not #! on SCO XENIX (or any other system for that matter). -- Phil uunet!pilchuck!ssc!fyl