Chapter 12: Using Arguments and Functions
Whenever we are trying to program any kind of application or a script in any programming language, we should always try to make our code modular and easily maintainable. The thing that is going to help us a lot in this aspect of creating scripts is a concept known as a function.
We will cover the following recipes in this chapter:
- Using custom functions in shell script code
 - Passing arguments to a function
 - Local and global variables
 - Working with returns from a function
 - Loading an external function to a shell script
 - Implementing commonly used procedures via functions