# comment character
Avi E. Gross
avi at pegasus.UUCP
Thu Jun 27 09:20:53 AEST 1985
In article <291 at ucdavis.UUCP> ccrrick at ucdavis.UUCP (Rick Heli) writes:
>Can anyone tell me why the # character is a comment in INTERACTIVE
>mode in the shell? I mean, who goes around making comments that
>will never be seen again while running the shell in interactive
>mode?
Why should it mean anything else in interactive mode? I often
create complicated commands I would like to execute later and put a '#'
at the beginning. Then, when I am ready to run it (often after another
process has completed running in the background or another window), I use
the nifty Korn shell commands to return to that line, strip the '#' and
actually run it.
Similarly, I sometimes enter an in-line function, with some lines commented
out and run it. After checkking to see that it does the right things, I edit
it and remove the '#'s.
A better question is why the '#' character was used as a comment character
when the typical UNIX*TM Operating System came with '#' as the default
character-delete character?
--
-=> Avi E. Gross @ AT&T Information Systems Laboratories (201) 576-6241
suggested paths: [ihnp4, allegra, cbosg, ahuta, ...]!pegasus!avi
More information about the Comp.unix
mailing list