Writing Comments in Bash Scripts

Posted by linuxize on Oct 3, 2019 5:16 PM EDT
Linuxize.com; By Linuxize
Mail this story
Print this story

In Bash, everything after the hash mark (#) and until the end of the line is considered to be a comment.

Comments are usually used to explain what the code can’t. For example, if you have a complex regex or parameter substitution inside your Bash script, you should write a comment about what the code does. Comments should be short and to the point. Do not explain something which is simple and obvious to the reader.

Full Story

  Nav
» Read more about: Story Type: Tutorial

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.