Bourne Shell Comments Problem

brad morrison XNX SE# morrison at ficc.uu.net
Fri Sep 23 06:38:46 AEST 1988


In article <292 at dsacng1.UUCP> nab1382 at 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 at ficc.uu.net)    Sugar Land, TX 77478
------------ grep me no patterns and I'll tell you no lines -------------



More information about the Comp.unix.questions mailing list