Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!mtune!jhc From: jhc@mtune.ATT.COM (Jonathan Clark) Newsgroups: comp.unix.wizards Subject: Re: csh execution Message-ID: <1102@mtune.ATT.COM> Date: Tue, 23-Jun-87 23:23:39 EDT Article-I.D.: mtune.1102 Posted: Tue Jun 23 23:23:39 1987 Date-Received: Thu, 25-Jun-87 04:37:48 EDT References: > <2211@bunker.UUCP> <1097@mtune.ATT.COM> <21681@sun.uucp> Reply-To: jhc@mtune.UUCP (Jonathan Clark) Organization: AT&T ISL Middletown NJ USA Lines: 43 > >> On a similar note, for the people who are expounding starting one's >> shell scripts with "#! /bin/csh", the logical continuation of this is >> to start one's C programs with "#! /bin/cc", and so on. > >No. Executable files begin with a magic number, which indicates the >interpreter to be used to execute that file. I was insufficiently precise - I meant that the continuation was that one should start one's C *source* programs with "#! /bin/cc" then instead of saying 'cc file.c' one would just say 'file.c' and the kernel would automatically invoke the correct interpreter. This is not a bad feature, but it isn't what I understand as UNIX (though it probably is already implicit in BSD systems). > partial superset language processors This based on the perceived knowledge that there are Bourne shell mechanisms not supported by C shell (which I admit I have never used) - if this is not the case then I withdraw the comment. >> Perhaps csh should have been made to interpret a strict superset of the >> Bourne shell, > >Considering that the C shell, I believe, antedated the Bourne shell >(or, at least, the public availability of the Bourne shell), this >might not have been practical. Well, I am by no means an old hand at UNIX, but I remember using the Bourne shell or something very like it (and written in Algol, more or less) in 1977 on my v6 system. As an extension of the concept of magic numbers I can see the value of the mechanism, perhaps UNIX should have had a system call "hardware" which meant "run this file on the machine's actual real CPU"? Then everyone would have got used to feeding their input through *some* sort of language processor (and example of which is hardware). -- Jonathan Clark [NAC,attmail]!mtune!jhc An Englishman never enjoys himself except for some noble purpose.