We've seen how to use and write aliases, functions, and scripts, and demonstrated why you should almost always choose functions or scripts over aliases, including a demonstration of how to pass arguments for both to the commands within them.
Knowing how to implement your own custom commands effectively allows you to take full advantage of the expressiveness of the GNU Bourne-Again Shell. It's like extending the programming language by defining your own words for it, whether for your own private use, or to share with other users of the system. When you get good at doing this, and define many commands to suit your specific tasks, you can work so quickly and effectively that it looks like magic to anyone watching.
In the final, chapter, we'll go through some best practices for shell scripting—some general recommendations and techniques to make your scripts...