Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site iclbra.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!bellcore!decvax!genrad!mit-eddie!think!harvard!seismo!mcvax!ukc!stc!iclbra!apm From: apm@iclbra.UUCP (Andy Merritt) Newsgroups: net.unix Subject: Re: Comment lines in the Bourne shell Message-ID: <158@iclbra.UUCP> Date: Thu, 13-Jun-85 19:02:09 EDT Article-I.D.: iclbra.158 Posted: Thu Jun 13 19:02:09 1985 Date-Received: Mon, 17-Jun-85 20:13:35 EDT References: <1194@uwmacc.UUCP> Distribution: net Organization: I.C.L., Lovelace Road, Bracknell, Berkshire. Lines: 29 Xpath: stc stc-a > 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 | lpr > > produces a message referring to the pipe, even though the whole > line is commented out. What am I missing? > > -- > Jeff Percival ...!uwvax!uwmacc!jwp According to the SysV documentation I have, ':' is a special command for which the manual says : no effect; the command does nothing. A zero exit code is returned. This implies that the effect is not to ignore the rest of the line as you expected, but to take as arguments anything up to a normal terminator and then do nothing with them. The | is met in this case, and nothing is in the input for the lpr. I guess this must be what is happening on the 2.8BSD system also. Andy /^^^\ ( o o ) --w---U---w-- UUCP: ...!ukc!stc!iclbra!apm "Wot, no news?" MAIL: Andrew Merritt, ICL, Lovelace Rd, Bracknell, Berkshire