Bash script comment

How to use bash script put Multiple Line Comment. Would you like to use bash script comment? Bash script the essential for DevOps Roles. The syntax comment in a Bash script comment as below

Bash script comment

Single line comment

# Comment line 1
# Comment line 2

HERE DOCUMENT COMMENT

<<COMMENT
  Comment 1
  Comment 2
  Comment N
COMMENT

Multiple line comment

: '
This is a
multiple line
comment
'

Example Bash script comment

#!/bin/bash
_foo="Wellcome to Devopsroles.com"

# Single line 1
# Single line 2

<<COMMENT
  Comment 1
  Comment 2
  Comment N
  HERE DOCUMENT comment
COMMENT

: '
This is a
multi line
comment
'
echo ${_foo}

The screen output terminal:

Bash script comment

Conclusion

Thought the article, you can use Bash script comment as above. I hope will this your helpful. More details refer to Bash script.

About HuuPV

My name is Huu. I love technology and especially Devops Skill such as Docker, vagrant, git so forth. I likes open-sources. so I created DevopsRoles.com site to share the knowledge that I have learned. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.