In the previous chapter, we explored some of the most important commands provided to you by the Bash shell and by a Unix system that implements the POSIX standard. These commands have many uses on their own, and they can additionally serve as the basis for making your own custom commands, to perform specific tasks that you need and remember them for convenience in the future.
This chapter explores three different types of custom commands that you can write to use in your Bash scripts or on the Bash command line:
- Aliases: Can expand a word into a command line string
- Functions: A way to write a command from a set of other commands, much more versatile than aliases
- Scripts: Take the form of programs in files on your system, and unlike aliases and functions, can be used outside of Bash
We'll look at each of these in turn, demonstrating them with...