This article is part (iv) of the Linux Shell Series tutorial, more on the Shell Tutorial: Linux Shell Series Tutorials
Like many programming languages, there are annotation symbols in the shell, and today we introduce the syntax and usage of annotations in the shell.
Comments in the shell begin with the "#" sign, and all code that begins with the "#" sign is ignored by the interpreter.
For example, the following code:
#!/bin/bash# author:linuxdaxue.com# Date:2016-05-15echo "What's your name?" Read Personecho "Hello, $PERSON"
The Author field and date field that begin with the "#" sign are comments in the shell.
And there is no multiline comment in the shell, only a single-line comment, so this is the only way to annotate the code.
For more shell tutorials See: Linux Shell Series Tutorials
This article fixed link: Linux University network--linux Shell Series Tutorial (four) Shell comments
Shell comments for the Linux Shell Series Tutorial (d)