CHAPTER 13Self-Linked Scripts
The technique I am about to discuss allows you to have a single script that can be called in several ways by different names. The script itself contains all the code necessary to perform a number of tasks, but you may want to determine the specific task to be performed at runtime by calling the script by a specific name. This lets users invoke an individual task by name without having to learn specialized command-line switches for the options they want.
There are two of ways of specifying the precise behavior of a script. One way is to have the script accept command-line options telling it how to act. This method is covered in Chapter 5, which dealt with the use of getopts. This chapter illustrates the second method: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access