Chapter 10. Additional Features for Scripting

Many scripts are written as simple one-off scripts that are only used by their author, consisting of only a few lines, perhaps only a single loop, if that. But some scripts are heavy-duty scripts that will see a lot of use from a variety of users. Such scripts will often need to take advantage of features that allow for better sharing and reuse of code. These advanced scripting tips and techniques can be useful for many kinds of scripts, and are often found in larger systems of scripts such as the /etc/init.d scripts on many Linux systems. You don’t have to be a system administrator to appreciate and use these techniques. They will prove themselves on any large scripting effort.

Get bash Cookbook 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.