December 1999
Beginner
528 pages
11h 10m
English
To source a file, it does not only have to contain functions – it can contain global variables that make up a configuration file.
Suppose you had a couple of backup scripts that archived different parts of a system. It would be a good idea to share one common configuration file. All you need to do is to create your variables inside a file then when one of the backup scripts kicks off it can load these variables in to see if the user wants to change any of the defaults before the archive actually begins. It may be the case that you want the archive to go to a different media.
Of course this approach can be used by any scripts that share a common configuration to carry out a process. Here’s an example. ...
Read now
Unlock full access