Path: utzoo!mnetor!uunet!mcvax!ukc!its63b!aiva!richard From: richard@aiva.ed.ac.uk (Richard Tobin) Newsgroups: comp.unix.questions Subject: Re: Weird things in csh (and kernel?) Message-ID: <275@aiva.ed.ac.uk> Date: 3 Mar 88 14:25:08 GMT References: <1193@ark.cs.vu.nl> <662@sjoerd.cs.vu.nl> <1195@ark.cs.vu.nl> <7368@brl-smoke.ARPA> <1198@ark.cs.vu.nl> Reply-To: richard@uk.ac.ed.aiva (Richard Tobin) Organization: Bannerman's Bar, Cowgate, Edinburgh Lines: 16 Keywords: csh, script In article <1198@ark.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: [discussion of which shell csh uses to run a script] Csh [BSD 4.2] assumes that it should run /bin/sh if and only if (1) exec() fails with ENOEXEC (2) there isn't an alias for shell (3) it can read the first character of the file (4) that character isn't '#' Thus empty files get run with csh, because (3) is violated. -- Richard -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nss.cs.ucl.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin