Chapter 17: Advanced Shell Script Examples
So far, we have done all we could to show you different ways scripts can be written, and we went through a lot of examples of how different tasks can be accomplished. In this chapter, we are going to implement all this in a much more complex way in scripts that can be used in real life.
The scripts we are going to show you in this chapter solve everyday problems for system administrators, from dealing with creating new users to working with virtual machines (VMs). By walking you through these examples, our aim is not only to show you how scripts should work but also what they should look like and how to approach writing them.
In this chapter, we are going to cover the following shell script examples:
- Implementing a web server service and security settings
- Creating users and groups from a standardized input file and a standardized password and forcing users to change them on the next login
- Creating users and groups from...