Weird things in csh (and kernel?)

Richard Tobin richard at aiva.ed.ac.uk
Fri Mar 4 00:25:08 AEST 1988


In article <1198 at ark.cs.vu.nl> maart at 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 at uk.ac.ed             
AI Applications Institute,             ARPA:  R.Tobin%uk.ac.ed at nss.cs.ucl.ac.uk
Edinburgh University.                  UUCP:  ...!ukc!ed.ac.uk!R.Tobin



More information about the Comp.unix.questions mailing list