Issue
Is there a simple way to comment out a block of code in a shell script?
Solution
In bash:
#!/bin/bash
echo before comment
: <<'END'
bla bla
blurfl
END
echo after comment
The '
and '
around the END
delimiter are important, otherwise things inside the block like for example $(command)
will be parsed and executed.
For an explanation, see this and this question.
Answered By - sunny256