Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!uwvax!mcvoy From: mcvoy@rsch.WISC.EDU (Lawrence W. McVoy) Newsgroups: comp.unix.questions Subject: Re: csh scripts on sys V question Message-ID: <2964@rsch.WISC.EDU> Date: Wed, 19-Nov-86 12:34:14 EST Article-I.D.: rsch.2964 Posted: Wed Nov 19 12:34:14 1986 Date-Received: Wed, 19-Nov-86 21:42:34 EST References: <787@chinet.UUCP> Reply-To: mcvoy@rsch.WISC.EDU (Lawrence W. McVoy) Distribution: net Organization: U of Wisconsin CS Dept Lines: 20 Keywords: Hack sh(1) Summary: Sure, it's easy In article <787@chinet.UUCP> megabyte@chinet.UUCP (Dr. Megabyte) writes: >_IF_ I type "csh script". Now, is there anyway for me to set up my 3b2 so that >I can just type "script" and have the proper shell chosen, either Bourne or >'C'? As I understand it the sh is started up to handle shell scripts, right? In Bezerkeley Unix I think the kernel figures out what program to exec. I don't see why the sh couldn't do this. For instance, change the sh to look at the first line and exec it if the line is of the form '#' '!' and program name != '/bin/sh' or 'sh' Anybody have any problems with this? -- Larry McVoy mcvoy@rsch.wisc.edu, {seismo, topaz, harvard, ihnp4, etc}!uwvax!mcvoy "They're coming soon! Quad-stated guru-gates!"