Languages
[Edit]
EN

Bash - comments

0 points
Created by:
Hiba-Tate
548

In this article, we would like to show you how to create comments in Bash.

Quick solution:

#!/bin/bash

# Single-line comment in bash

echo "Example message..." # Inline comment in bash

 

Explanation

In order to create comments in Bash, we need to use the hash character (#). Every word after the # will be ignored by the Bash shell.

Note:

Bash comments can only be single-line comments. 

 

Alternative titles

  1. Bash - create comment
  2. Bash - create comments
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join