In this chapter, you learned how to create basic shell scripts on a Linux system. A shell script is a text file that is interpreted and run by the bash shell. A shell script contains a series of commands that automate tasks and process information for you. A shell script is composed of the following parts:
• shell commands
• exit 0
Shell scripts can be edited with any text editor. They can be executed in one of two ways:
• Entering /bin/bash script_filename.
• Adding the execute permission to the script file using the chmod utility and entering the filename of the script at the shell prompt.
In addition, you can also add the path to the script file to your PATH environment variable so users won’t have ...