Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 737 Bytes

006_Comments_in_Shell.md

File metadata and controls

30 lines (23 loc) · 737 Bytes

Comments in Shell

BASIC VI COMMANDS --- HOME --- EXECUTING A SHELL SCRIPT

  • A line begining with # causes that line to be ignored.
  • It is nothing but explanatory text about script.
  • It makes source code easier to understand.
  • Helps others to understand the code, to help to modify the script.

Shebang is not considered to be comment, instead it is completely different as explaied.

#!/bin/bash
echo "Kshitiz here"
#I am printing my name

Multiple Line Comment

To create a multiple line comment, we use,

#!/bin/bash
echo "Kshitiz Here
<<COMMENT_NAME 
Multi-Line Comment
Again a comment
COMMENT_NAME
echo "Comment Finished"