Monday, March 30, 2015

How to comment multiple lines in Unix

If you have a shell script and want to comment multiple lines at once (and not to write # in front of every line) use the following.

<< --COMMENTS
 

code

--COMMENTS


All the code in between will not be executed when you source the file, and instead will be sent to a "here"-document.

No comments:

Post a Comment