Scripting for administrative tasks
Scripting in a Linux operating system is mainly useful when it can help with mundane administrative tasks. This way, you can automate your workflow in ways that will make your job easier and more enjoyable. There are many use cases of shell scripts, and we will only provide you with a quick and easy example, hoping that it will suffice for understanding how a script can be used for a sysadmin task.
In the following sections, we will show you how to build a distribution-specific package from a source. This is something that should have been presented to you in Chapter 4, but at that time, you did not know how to create a script. In this chapter, we only used Ubuntu 22.04.2 LTS for our examples. In the following sections, we will use Fedora 37 Server Edition for our examples.
Creating scripts for system administrative tasks
In this section, we will show you a couple of scripts for administrative tasks. As we stated at the beginning of this...