Friday, May 20, 2022

Bash Scripting 7

 Bash Scripting 





Comments:

  • Comments are the normal language text that will be written inside code to give idea about the code if we take a look at it after a period of time.
  • If we see a big code which we done previous after a long time.The first question arise in mind is        "Whether I have done it or With what idea i wroteπŸ€” , May be sometimes what language is thisπŸ˜…".
  • But if these line don't match the syntax of a particular language or made someother meaning to code.It will completely mess up the code.
  • Every language has there own way of writing comment.
  • The only thing is ,the statement we write should not disturb the original code.
  • It should be a piece of line ,which should be read only by the human and not by the compiler.
  • In bash ,we have two ways of commenting,
    • Single line comment
      • This will comment only one line.
      • The command format should be repeated for everyline we wrote.
      • The "#" is used to make single line comment.
      • For Example,
        •  <# This line is a comment.>

        • The red marked are comment.The yellow box is the general code of bash.
    • Multi line comment
      • This can be used to comment certain number of comment.
      • If in a code we had more than one continuous comment line we can use multiline comment instead of repeating single line comment for multiple times.
      • The " : ' .....Comments (can be multiline)   '
      • For Example:
        • <: ' 
        • Comment1
        • Comment2
        • Comment3 '>



No comments:

Post a Comment

Google Cybersecurity Professional Certificate

    Google Cybersecurity Professional Certification πŸ”’ Google Cybersecurity Professional Certification: A Journey Unveiled! πŸ”’ Hey Folks! 🌟...