# comment character

Rick Heli ccrrick at ucdavis.UUCP
Sat Jul 13 08:17:27 AEST 1985


	Well, I certainly received many interesting answers to my 
question about why the # is a comment in the interactive mode in 
the shell.  Thank you.

	A few thoughts on the responses:

	One person said he uses it in connection with the history
mechanism.  Well, the Bourne shell has no history mechanism, so his
answer is only useful to Korn shell users and those who've hacked
shell.

	Another person said that the shell makes no distinction
between interactive and non-interactive mode.  But on the other 
hand, the # is a comment in C shell scripts, but not in C shell
interactive mode.  This makes me doubt that shell makes no
distinction.

	Finally, someone else asked what kind of special function
I would like to give to the # character.  Actually, there is none.
I would like it to be a regular member of the character set for use
in marking certain kinds of files.  I frankly don't see why I should
need a comment in interactive mode and besides I could use ":" if I
wanted to use it inside script or something.
-- 
-----
"Rescue your DNPC from a horrifying menace today!"
-----
					--rick heli
					(... ucbvax!ucdavis!groucho!ccrrick)



More information about the Comp.unix mailing list