Creating a Library

Now that you have learned the basics about creating and using a library, you can create a library of utility functions designed to facilitate scripting tasks. In this section, you will learn about several of the functions from the library. The “Questions” section at the end of this chapter asks you to develop five additional functions for this library. The entire library, including sample implementations of the functions you will be asked to develop, is listed in Appendix D,“Shell Function Library.”

Naming the Library

For the purposes of this discussion, assume that the library is located in the file $HOME/lib/sh/ The name of this library was derived as follows:

  • The lib in indicates that this file is ...

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.