PreviousNext

When To Use an Interactive Command or Script

There is no absolute dividing line for when you should enter commands interactively or with a script. In general though, the simpler operations - those that perform one or maybe two tasks - make the best candidates for interactive use. The following examples typify interactive operations:

dcecp> directory create /.:/printers

@dcecp> account show w_shakespeare

@dcecp> server start /.:/hosts/curley/config/srvrconf/BBSserver

The next example is a little more complicated so at first, you might choose to run this as a script.

foreach i [group list temps] {
account modify $i -expdate 1996-06-30}

Saving a frequently used operation as a script (in a file) has its advantages; it can help to automate repetitive or complicated tasks and you can keep it around for possible modification and use in other situations later on. Whichever method you choose, as you become more comfortable using dcecp and Tcl, you might find yourself entering fairly complex operations interactively. For information on how to create and invoke scripts, refer to Customizing dcecp Sessions.