As the title implies this article will be covering Bash Shell Scripting at a beginner level. I’m not going to review the history of Bash but there are many resources to fill you in or you can visit the GNU project at https://www.gnu.org/software/bash/. We will start out with understanding some very basic concepts and then start to put things together.
In the home directory, create the example file. This can be named anything but learnToScript.sh will be used in this article.
From this point there will be a file called learnToScript.sh in your home directory. Verify it exists and also notice the privileges for that file are -rw-rw-r– by typing the following.
There is one more thing that needs to be done to get started. Let’s try and execute the script with nothing written in it. Type the following:
You get permission denied because there are no execute permissions on the file. You need to change the permissions of the file to be able to execute the script. If you are not familiar with permissions I would recommend reading the Fedora Magazine articles written by Paul W. Frields