The following scripts illustrate the use of the Tcl
source command to run the script in a specified file. In this example, the source file is
setenv, which prompts the user to enter environment variables such as the domain and zone.
Note: You may find repeated use of
setenv to be maddening since it prompts you for all of the environment variables regardless of whether the command actually needs them. This is done for demonstration purposes only. In a production environment, you would eliminate the prompts you don’t need by tailoring
setenv specifically to your environment. Feel free to remove or comment out parts when you’ve had enough.
The subsequent scripts in this section call the
setenv script and then run a short script that does simple queries, such as get the child zones, get the computers in the zone, and get the groups.