Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!apple!voder!pyramid!vsi1!datack!cratz From: cratz@datack.UUCP (Tony Cratz) Newsgroups: comp.unix.questions Subject: Re: Bourne Shell Comments Problem Keywords: Bourne Shell UNIX Problem Message-ID: <1503@datack.UUCP> Date: 3 Oct 88 17:05:05 GMT References: <292@dsacng1.UUCP> <375@stiatl.UUCP> <8567@smoke.ARPA> <1628@ficc.uu.net> <8608@smoke.ARPA> Reply-To: cratz@datack.UUCP (Tony Cratz) Organization: Datachecker System Inc, Santa Clara, Ca. Lines: 40 In article <8608@smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >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. . . . >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 >I notice that few porters of csh to a UNIX System V environment seem to >be familiar enough with the UNIX System V environment to fix such >incompatibilities when they do the port. I have found that on the different sytems that I have worked on so far that under SYS V.2 that if you start your Bourne Shell scripts with the bourne shell comment ':' that it will always run the shell as bourne. I had to find some way to port shell scripts from BSD to SYS V.2 that I could be be sure of working. Now all of my Bourne shell scripts start with the following line : !/bin/sh (run script as Broune Shell) -- "Looks like plant food to me" Tony Cratz work phone: (408) 982-3585 UUCP: uunet!altnet!datack!cratz Snail: Datachecker, 800 Central Expressway MS 33-36, Santa Clara, Ca 95052