CHAPTER 12Runtime Configuration
When I download my mail from three or four different POP3 servers, I don't use a different script for each one. When I open a terminal to ssh
to a remote computer (half a dozen of them) with a different background color for each, I use the same script for every connection. To upload files to my web sites (I look after six sites), I use the same script for all of them.
You can configure a script's behavior in several ways when you run it. This chapter looks at seven methods: initialized variables, command-line options and arguments, menus, Q&A dialogue, configuration files, multiple names for one script, and environment variables. These methods are not mutually exclusive; in fact, they are often combined. A command-line ...
Get Pro Bash Programming: Scripting the GNU/Linux Shell 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.