Path: utzoo!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mailrus!uflorida!haven!ncifcrf!nlm-mcs!adm!smoke!gwyn From: gwyn@smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.questions Subject: Re: Bourne Shell Comments Problem Keywords: Bourne Shell UNIX Problem Message-ID: <8608@smoke.ARPA> Date: 3 Oct 88 06:48:21 GMT References: <292@dsacng1.UUCP> <375@stiatl.UUCP> <8567@smoke.ARPA> <1628@ficc.uu.net> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 25 In article <1628@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: >In article <8567@smoke.ARPA>, gwyn@smoke.ARPA (Doug Gwyn ) writes: >> Nearly all Bourne shell scripts I have encountered in the past >> several years start with #. >You must not have used systems with the csh available then, since csh (not >sh) uses the first character to determine whether to pass the script off onto >the bourne shell. Csh on old BSD systems did this, since # was not a general comment character in the really old version of the Bourne shell that they used. Later a hack was added to permit a limited form of # comments in Bourne shell scripts on BSD systems. UNIX System V has always had general # comments in Bourne shell scripts, and most scripts start with comments describing what the script is for, etc. However, a port of csh to UNIX System V should NOT "exec" scripts using csh, and a Bourne shell even on BSD should never do this. On BSD systems, the #! kludge can be used to force the right interpreter; on UNIX System V this is not usually supported, and since csh is not standard on UNIX System V in that environment shell scripts should always be executed by a Bourne shell (except for explicit "csh