Writing your first Bash shell script
Before we do a simple Hello World!
shell script, let's quickly talk about the shell itself and what does it do on a normal Linux machine. The simplest way of describing it is that the shell is the connection between the user (us) and the kernel (the part of the operating system in charge of everything). We have already talked about that before, but we need to make some points here to make it easier to explain some concepts.
The shell is an application that usually displays a prompt and finds and runs whatever command we give it. This is called the interactive shell and is the most-used way of working in Linux. This is what all the Command-Line Interface (CLI) business is about – having an interface that enables us to execute whatever we need:
There is, however, another mode of operation for a shell called non-interactive mode. This covers all the instances of the shell...