Tuesday, December 18, 2012

Multi line comments in bash

: <<'--COMMENT--'
1. Plain comments are allowed
2. Code will be completely ignored
ls; echo foo > /dev/null
3. Single line comments as well
#You can have one line comments inside the block as well
4. Indeed, anything other than the label you surround in quotes (---COMMENT-- in this example)
--COMMENT--

No comments:

Followers