[quote] How to comment multi-lines in bash shell script.

 

From 

http://stackoverflow.com/questions/947897/block-comments-in-a-shell-script

 

In bash:

#!/bin/bash
echo before comment
: <<'END'
bla bla
blurfl
END
echo after comment

The ' and ' around the first END delimiter is important, otherwise things inside the block like for example $(command) will be parsed and executed.

 

 

 

posted on 2013-12-20 17:37  Shawn X.Y. Bai  阅读(356)  评论(0编辑  收藏  举报

导航