Search code examples
shellcommentsmultiline

Way to create multiline comments in Bash?


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?


Solution

  • Use : ' to open and ' to close.

    For example:

    : '
    This is a
    very neat comment
    in bash
    '