Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!amdcad!ames!mailrus!tut.cis.ohio-state.edu!rutgers!bellcore!tness7!tness1!sugar!ficc!morrison From: morrison@ficc.uu.net (brad morrison XNX SE#) Newsgroups: comp.unix.questions Subject: Re: Bourne Shell Comments Problem Summary: Csh looks at first char to decide whether to run csh or sh Keywords: Bourne Shell UNIX Problem Message-ID: <1578@ficc.uu.net> Date: 22 Sep 88 20:38:46 GMT References: <292@dsacng1.UUCP> <8225@alice.UUCP> Organization: Ferranti International Controls Lines: 19 In article <292@dsacng1.UUCP> nab1382@dsacng1.UUCP (Dick Hauser) writes: >I have a question regarding usage of a comment line in the Bourne >Shell. Here is the situation. The comment indicator (i.e #) is >in position 1 of the first record of the file. The comment line >was followed by a read command for a variable. When the shell >was executed using "sh -x shellname", everything worked. But >when the shell is executed, and execution is not traced, an error >message "read not found" is displayed. Sounds like you have a Cshell running the Bourne shell script. Csh assumes that the script is to be run with a csh child if the first character is '#'. Even though '#' is the comment indicator for both shells, csh gives it additional (and sometimes inconvenient) meaning. -- Brad Morrison Ferranti International Controls Corporation phone: (713) 274-5449 12808 W. Airport Boulevard UUCP: uunet!ficc!morrison (morrison@ficc.uu.net) Sugar Land, TX 77478 ------------ grep me no patterns and I'll tell you no lines -------------