Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site ittatc.ATC.ITT.UUCP Path: utzoo!decvax!ittatc!yoda From: yoda@ittatc.ATC.ITT.UUCP (Todd C. Williams) Newsgroups: net.unix,net.unix-wizards Subject: history question-- Bourne (and C) SHELL COMMENTS Message-ID: <1751@ittatc.ATC.ITT.UUCP> Date: Tue, 5-Aug-86 19:44:43 EDT Article-I.D.: ittatc.1751 Posted: Tue Aug 5 19:44:43 1986 Date-Received: Tue, 5-Aug-86 21:43:32 EDT Distribution: na Organization: ITT-ATC, Shelton Ct. Lines: 40 OK, we're from a mixed (SysV, 4bsd, V6, V7) background here, and a question has come up which NO ONE is clear on: How do you put a comment in a shell script? This is not in the standard documentation! S.R.Bourne doesn't mention it in his 1978 paper, except for the following line from an example script: : 'colon is the comment command' Some say that the colon introduces a comment, but that is not entirely true, since the line still gets evaluated, at least somewhat. So what is the purpose of the colon? It's not a comment, but it is???? Others say that it is the sharp/pound/number sign, "#" <--that thing, but if you're on a bsd system, you can't START your Bourne shell script with it, or the C shell will run your script. Or should you start with #!/bin/sh ??? And does the csh fork here, or exec? What is the historical development of the : and the # ? I am SURE that the colon was the character to use in V7, but.... There are several methods to use here. Which is the one of choice? and why? Are there advantages/disadvantages with any of these methods {especially the #!/bin/sh method above}? -- +------------------------------------------------------------------------------+ | Todd C. Williams | "Summer blonds | | ITT Defense Communications | revealing tan lines, | | Nutley, NJ | I'll make more moves than | | {decvax, et al.}!ittatc!dcdvaxb!tcw | ALLIED VAN LINES!" | | +1 201 284 3305 | --from: "I wanna be a lifeguard" | | I love to receive e-mail! | by BLOTTO | +------------------------------------------------------------------------------+