Let's look at this shell script. However, it is a practice which is highly recommended. The second line is a comment . The rest of the lines in the script are just commands, as you would type them to the shell directly. In effect, the shell reads each line of the script and runs that line as if you had typed it at the shell prompt.
Permissions are important for shell scripts.
If you create a shell script, you must make sure that you have execute permission on the script in order to run it.