Chapter 4. Creating and Calling Subroutines
This chapter shows how to create and call subroutines in a script.
The topics covered in this chapter are as follows:
- Show some simple subroutines.
- Show more advanced routines.
- Mention return codes again and how they work in scripts.
In the previous chapters we have seen mostly simple scripts that were not very complicated. Scripts can actually do a whole lot more which we are about to see.
First, let's start with a selection of simple but powerful scripts. These are mainly shown to give the reader an idea of just what can be done quickly with a script.