Comments are pieces of text or whitespace that can be included in a program to make the code more understandable to a programmer. Comments have no effect on the running program and are ignored by the awk interpreter.

In awk, comments can be inserted by prefixing them with a hash symbol. The awk interpreter will ignore the hash symbol and any other characters that follow it until the end of the line:

 # This whole line is a comment and is ignored by the awk interpreter
 print 'Hello!' # Comments after a hash sign are ignored