Path: utzoo!attcan!uunet!sco!rosso From: rosso@sco.COM (Ross Oliver) Newsgroups: comp.unix.xenix Subject: Re: "#!" scripts, kernel patches, and Xenix Message-ID: <858@viscous> Date: 12 Sep 88 08:23:06 GMT References: <161@tessera.UUCP> Organization: SCO Technical Support Lines: 15 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