Serializing basic commands – from simple to complex
Scripts are nothing more than a list of commands that are executed in a particular order. In its most basic structure, the order is completely linear without any decision making, loops, or conditional branching.
Commands are executed from first to last, from top to bottom, and from the start of the line to its end. Even if it sounds simple and not very useful, this way of creating scripts can have its uses, since it enables us to quickly run a predefined set of commands instead of repeating them from the command line. In other words, there are problems that require more than a single one-line command but are not complicated enough to require complex logic. This is not to devalue complex Bash scripting logic, as there's a lot of automation in IT that can be implemented by using Bash scripting.
Let's now imagine a simple task like that, something that we will be using as a recurring example. We are going to...