Comment lines in the Bourne shell

foss foss at ihuxe.UUCP
Mon Jun 17 22:54:39 AEST 1985


> I've noticed that on my system (2.8BSD) the Bourne shell
> comment character doesn't do what I expected.  The shell
> still looks at some characters on the line, even though
> the line is commented out.  For example, the comment
> 
> : to use this file type <name> | lpr
> 
> produces a message referring to the pipe, even though the whole
> line is commented out.  What am I missing?
> 
.................................

The colon (:) is not just a 'comment' character, it is a command
which has no effect.  The message about the pipe is to be expected.
Try using the octothorpe (#) as a comment character.

R. M. Foss



More information about the Comp.unix mailing list