From the course: Learning Linux Shell Scripting

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Comments

Comments - Linux Tutorial

From the course: Learning Linux Shell Scripting

Start my 1-month free trial

Comments

- [Instructor] All scripts start small, but even small ones can be difficult to understand. It is a best practice to include comments in your scripts which explain them. A comment begins with the pound sign, and ends at the end of the line. Let's go back into our script, Let's add one to our script just before the first echo line. So we'll go to the top of the page, give ourselves a little room, add a comment, and even put a little space in there, and then do a Ctrl + S to save it. And let's run our script again. We'll go back to Terminal, and we will say dot slash hello.sh. Our script still functions as it did before. Comments are a programmer thing not something for the user. They aren't displayed like echo.

Contents