The bash tarball includes a lot of material that is well worth exploring (after you’ve finished reading this book, of course). It includes sample code and examples, scripts, functions, and startup files. The easiest way to access this material is via our up-to-date list with hyperlinks, but we’re including this appendix to provide a taste of what you’ll find since few people actually access the tarball or build from source anymore.
The startup-files directory provides many examples of what you can put in your own startup files. In particular, bash_aliases has many useful aliases. Bear in mind that if you copy these files wholesale, you’ll have to edit them for your system because many of the paths will be different. Refer to Chapter 16 for further information on changing these files to suit your needs.
The functions directory contains many function definitions that you might find useful. Among them are:
The basename utility, missing from some systems.
Directory manipulation facilities.
The dirname utility, missing from some systems.
An implementation of the Tenth Edition Bourne shell whatis builtin.
An almost exact clone of the Korn shell whence builtin.
If you come from a Korn shell background, you may find kshenv especially helpful. This contains function definitions for some common Korn facilities such as whence, print, and the two-parameter cd builtins. ...