Bash Comment
A comment starts with #. Bash ignores everything from the # to the end of the line.
Use comments to explain what a script does, or put # in front of a command to stop it from running. Bash also ignores the shebang line #!/bin/bash; the system reads it to choose the program that runs the script.
Comments in a script
Save this as comments.sh:
#!/bin/bash
# This line is a comment
echo "Hello" # a comment can follow a command
# echo "This line does not run"
echo "Done"
Run it:
bash comments.sh
Hello
Done