A block comment in bash

source: https://www.freewayprojects.com/2013/04/a-useful-way-to-comment-out-blocks-of-code-in-bash/

Bash does not have an ‘easy’ way to comment out blocks of code – but this is simple enough.

At the beginning of the block you wish to comment out put:

: <<‘QWERTY’

and at the end of the block put:

QWERTY

I’ve used ‘QWERTY’ as it should be a string of characters which is not used in you code – adjust as needed.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s