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 :
I tried the chosen answer, but found when I ran a shell script having it, the whole thing was getting printed to screen (similar to how jupyter notebooks print out everything in '''xx'''
quotes) and there was an error message at end. It wasn't doing anything, but: scary. Then I realised while editing it that single-quotes can span multiple lines. So.. lets just assign the block to a variable.
x='
echo "these lines will all become comments."
echo "just make sure you don_t use single-quotes!"
ls -l
date
'
Use : '
to open and '
to close.
For example:
: '
This is a
very neat comment
in bash
'