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
Let see example of multi line comment
In Shell Script multi line comment can be of form
<<'COMMENT'
what ever written here is a comment
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
No comments:
Post a Comment