In the previous section, we showed you that you can run a shell script by typing sh followed by the name of the shell script file. You can also make a script executable, which means that you can run it simply by typing the script name at the shell prompt (omitting the name of the shell). Doing so is handy because it allows you to use the script as conveniently as you'd use any other command. As Code Listing 10.2 shows, you must set up a little before you can just execute the script.
Code Listing 10.2. After a little one-time preparation, you can run executable scripts by typing the script name at the shell prompt.