Loading...
Shell Script

Shell Script Comments

We should be aware of the fact that we might not be the only person reading our code. A lot  of users and system administrators run script that were written by other people. If we want to see how we did it, comment are useful to enlighten the reader.

By the help of Comments we can easily remember what we did, why we did, how we did, how it worked. It is easy to change our script if we want to change it after a few weeks or months.

By default shell script can be commented out prefixing # character, So if there are any lines starting with # then those lines are treated as comment lines and are removed at the time of execution

 

Leave a Reply

Your email address will not be published. Required fields are marked *