Summary

This chapter covered using shell scripts to solve two problems:

  • Creating init or startup scripts

  • Maintaining an address book

In the first example, you learned how the system boots and how scripts are used to streamline this process. In the second example, you developed three scripts that modify and view the contents of an address book. Some of the highlights of these scripts are

  • The showperson script showed you how the grep and awk commands can be used to format input.

  • The addperson script showed you how a single script can be used in both interactive and non-interactive modes.

  • The delperson script showed you how to use the grep command and file descriptors to update a file accurately.

The examples in this chapter demonstrate how you can ...

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.