19 September 2012

Multi Line comment in Shell Script

16 comments

Q. How do I use Multi Line comment in Bash


Ans:

We know that we can comment a line using '#' in Shell Script, but what if we want to comment a huge block of code? If we use '#' to comment that block then this can be very tedious task. Rather than using single line comment we can use multi line comment. In this tutorial i will show you how to use multi-line comment in Shell Script.

In Shell Script multi line comment can be of form

<<'COMMENT'

what ever written here is a comment

COMMENT

Let see example of multi line comment

#!/bin/bash
echo "Hii guys"
#starting of mullti line commnent
<<'COMMENT'
read a
echo "No line in this block will execute"
COMMENT
echo "Hello Guys"
exit 

OUTPUT


multi line comment in shell script

Enjoy :)


If You Liked This Post Please Take a Time To Share This Post

You May Also Like...

16 comments:

  1. Simple and good article.This is very helpful my writing.Thank you so much

    ReplyDelete
  2. Thanks for sharing this blog its very informative and useful for us .
    Term Papers Assignment Help

    ReplyDelete
  3. I hope everyone like this information they shared as I do. Really great information.
    HR Assignment Help Online

    ReplyDelete
  4. It is really nice blog that become inspiration to everyone.
    Ghostwriting Services Help

    ReplyDelete
  5. Analysis Case Study
    Thanks for such a great content on this website. 

    ReplyDelete
  6. ordervenue is big online shopping plateform to choice our product at a affordable price.
    ordervenue

    ReplyDelete
  7. Data Entry Verification MDLLC Provides reliable and accurate Data Processing Management services combined with timely delivery and business process outsourcing services. data conversion services

    ReplyDelete
  8. Hi Sandeep,

    Thank you for making this post, I have found it very useful so far. I am just wondering, what does the code actually do? For instance, the word 'COMMENT' can be replaced with any word, right? Thanks.

    ReplyDelete
  9. Wow, what a nice blog! Although I landed on it while I was looking for Psychology Paper Lit Review Services, I have enjoyed reading the article and the comments posted by other users. I will bookmark this site so that I can visit it occasionally to read both new and old articles.

    ReplyDelete
  10. nice and helpful blog..... for more assistance you can connect with us Programming Assignments Help

    ReplyDelete
  11. Useful and informative post. I like how of writing along with presenting. I got different information because of this article. You can talk about any informative article for me. I refer ideal essay writing solutions for completing my academic writing operate. it is easy and informative. college essay writing tips

    ReplyDelete
  12. This is my first time visit here. From the tons of comments on your articles, I guess I am not only one having all the enjoyment right here! Custom Essay Writing Service

    ReplyDelete
  13. Well written. Thanks for this article. Great work. This wanna surely help me a lot. Thanks again. Do my Essays

    ReplyDelete