Hour 21. Problem Solving with Functions

In previous chapters, you wrote short shell scripts that performed specific tasks. Many of these scripts performed common operations such as displaying error and warning messages and prompting the users for input. To easily repeat these tasks, you created reusable functions for your scripts.

In this chapter, you take this a step farther and create a library of functions that can be readily reused in shell scripts. A library is a repository of functions that can be accessed by shell scripts. The specific topics related to libraries that you will examine are

Get Sams Teach Yourself Shell Programming in 24 Hours, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.