Cheatsheets:
programming:
How-to:
Troubleshooting:
Rants:
Other:
Cheatsheets:
programming:
How-to:
Troubleshooting:
Rants:
Other:
You can use the : (colon) character as a no-op command to create a block comment. Here's an example:
: '
This is a block comment in Bash.
You can write multiple lines of comments
within the single quotes, and the shell will
ignore all the text within them.
'
The colon (no-op command) and the quotes are used to start and end the block comment. The shell will ignore everything between the single quotes, including line breaks and whitespace.
Alternatively, you can use the # character to create a single-line comment. For example:
# This is a single-line comment in Bash.
The shell will ignore everything after the # character until the end of the line.