Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!inuxc!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP Newsgroups: comp.unix.questions Subject: Re: why does this script... ( : and # ) Message-ID: <767@bsu-cs.UUCP> Date: Tue, 16-Jun-87 11:28:08 EDT Article-I.D.: bsu-cs.767 Posted: Tue Jun 16 11:28:08 1987 Date-Received: Thu, 18-Jun-87 01:43:22 EDT References: <913@rtech.UUCP> <7062@mimsy.UUCP> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 16 Summary: (a) Larry Wall's solution; (b) Perhaps SVR3 shared library's exec calls could be patched to recognize #!? In several articles strategies for ensuring execution by a specific shell are discussed. Larry Wall's terrific installation scripts for patch and rn use the equivalent of following line to force execution by sh: export PATH || (echo "OOPS, trying again..."; sh $0; kill $$) There ought to be a way of doing the same thing for other shells. The penalty is the extra fork (or is it TWO extra forks?). Perhaps somebody could publish a patch to SVR3's shared library so the exec family of system calls/functions will test for #!, and modify the text of the requested command, before passing control to the kernel? -- Rahul Dhesi UUCP: {ihnp4,seismo}!{iuvax,pur-ee}!bsu-cs!dhesi