OSF DCE Administration Guide--Core Components
OSF DCE Administration Guide—Core Components
proc _dcp_cleanup_user_create {account_name args} {
2.6 Convenience Variables
The DCE control program remembers what you enter as well as command output, and
stores certain pieces of that information in convenience variables for reuse in subsequent
commands. Using these variables in your interactive commands can reduce typing and
help eliminate typing mistakes.
Convenience variables apply only to dcecp commands like directory, principal, acl,
account, and so on. They don’t apply to Tcl commands like for or eval, or UNIX
commands like mv or grep. As an example, the convenience variable _n holds the name
(the argument) used in the following principal create operation. The principal show
operation retrieves the name by using the $_n variable.
dcecp> principal create D_Kalivas
dcecp> principal show $_n -all
{fullname {}}
{uid 17}
{uuid 00000011-d957-21cd-8d00-0000c08adf56}
{alias no}
{quota unlimited}
dcecp>
While this simple explanation demonstrates the general operation of convenience
variables, it understates their usefulness. Most of the convenience variables are intended
to aid interactive use, but some can be used in scripts as well, adding flexibility because
the information they contain isn’t hardcoded in the script. Moreover, as you gain
experience with the DCE control program, you will likely find these variables to be
indispensible administrative tools.
The DCE control program provides several convenience variables that substitute for
previously entered information or command output. All of the convenience variables
begin with a _ (underscore) to leave 1-character variable names free for other uses.
The following sections describe the convenience variables. Their order of presentation
generally keeps similar or related variables together.
2.6.1 Current Principal (User) Name (_u)
The _u convenience variable holds the current simple principal name. The DCE control
program sets this variable from the login context inherited from the parent process. You
can change its value by performing another login operation. Setting it using set
generates an error.
2− 8 Tandem Computers Incorporated 124243