Invoking and Terminating dcecp
The dcecp control program allows you to invoke dcecp commands in the following modes:
· Interactive mode
· Command line mode
Interactive Mode Activate interactive mode by entering the dcecp command without any arguments. At the dcecp prompt enter a dcecp command. The
dcecp program executes the command, displays the result, and is ready to accept another command.
% dcecp dcecp> directory list /.: -directories /.:/hosts /.:/subsys
Command Line Mode Activate command line mode from the system prompt using one of the following methods:
· Enter the dcecp command with a file name of a script containing dcecp commands (and/or other valid Tcl commands) as follows:
% dcecp myown.Tcl
· Enter the dcecp command with the -c option followed by a dcecp command.
% dcecp -c directory create /.:/admin/printers
Enter multiple dcecp commands by separating them with a semicolon (;) and enclosing the commands in double quotes (" "). Remember to escape shell
metacharacters (for example, by enclosing them in double quotes). Multiple commands must be on a single line as follows:
% dcecp -c "directory create /.:/admin/printers; \ directory show /.:/admin/printers"
When you use the -c option, operation results return to the interpreter, not to the shell. If you enter multiple operations, the output of only the last operation is returned
to the shell. This problem can be overcome by using the following ugly, but serviceable workaround:
% dcecp -c "puts [dir help]; puts [principal help]"
Terminate an interactive dcecp session using the exit and quit commands. Use the following command syntax:
exit n
quit n
Use the n argument to specify the exit value returned to the shell. If no value is specified, exit passes the return value of the most recent command to the shell. The following
example terminates a session and returns an exit value of 56 to the shell:
exit 56
By default, dcecp returns 0 (zero) on success and 1 if a command fails.
|