Comments
When you place comments in a shell program, the shell ignores all text on a line following a word
that begins with a ``#'' (pound) sign.
If the ``#'' sign appears at the beginning of a line,
the comment uses the entire line;
if it appears after a command,
the command is executed but
the remainder of the line is ignored.
The end of a line always ends a comment.
The general format for a comment line is
#comment
For example, a program that contains the following lines
will ignore them when it is executed:
# This program sends a generic birthday greeting.
# This program needs a login as
# the positional parameter.
Comments are useful
for documenting the function of a program
and should be included in any program you write.
Next topic:
Here documents
Previous topic:
Shell programming constructs
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005