The basics of BASH shell scripts
In this section, you will see a lot of information cited from the original BASH documentation, available as a man or info pages as well as online at https://www.gnu.org/software/bash/manual/html_node/index.html. It is excellent but hard to understand initially and not rich with examples. For examples, I find the site https://linuxhint.com/ one of the richest sources for all possible BASH options and functionalities. Our purpose here is to provide a crash course on the most important parts of the official GNU documentation. You will learn how to write a basic script and where to look for further information and examples.
As BASH is a scripting language, gaining a deep understanding of it would require a whole book. Hence, at the end of this section, I have recommended two BASH books from Packt Publishing, which provide a much deeper explanation and examples.
What a shell script is and how to run it
On Linux, the shell is the command-line interpreter...