Way to create multiline comments in Bash?

Enes Malik Turhan picture Enes Malik Turhan · Apr 1, 2017 · Viewed 204.9k times · Source

I have recently started studying shell script and I'd like to be able to comment out a set of lines in a shell script. I mean like it is in case of C/Java :

/* comment1
   comment2 
   comment3
*/`

How could I do that?

Answer

Vegas picture Vegas · Apr 1, 2017

Use : ' to open and ' to close.

For example:

: '
This is a
very neat comment
in bash
'