Comments

Using a # at the start of a line (without the ! of a shebang) turns the line into a comment.

 

Comment Frequently!!!

 

#    This is a comment, to remind me of what follows!

 

 

Alternatively, the HEREDOC /  HERE DOCUMENT notation <<IDENTIFIER can be used to create comments over multiple lines and is terminated by stating the same IDENTIFIER without the <<

 

 

Invoke:

sh comments.sh

 

Output:

Example of a block of comment lines:
Notice how the commented heredoc section is ignored.