Path: utzoo!utgpu!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!rutgers!bellcore!faline!thumper!ulysses!andante!alice!debra From: debra@alice.UUCP (Paul De Bra) Newsgroups: comp.unix.questions Subject: Re: Bourne Shell Comments Problem Keywords: Bourne Shell UNIX Problem Message-ID: <8225@alice.UUCP> Date: 21 Sep 88 17:33:50 GMT References: <292@dsacng1.UUCP> Reply-To: debra@alice.UUCP () Organization: University of Antwerp Lines: 18 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 varibale. 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. On some Unix systems instead of looking for the magic number #! the kernel only looks for # to find out whether a file is a shell script, possibly for another shell. So the # sign on position 1 of the first line of a file is not REALLY a comment indicator on these odd unix systems. Easy fix: start with an empty line first and start the comment on line 2. Paul.