PreviousNext

Convenience Variables

The dcecp program remembers what you type 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 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 is not hardcoded in the script. Moreover as you gain experience with the DCE control program, you will likely find these variables to be indispensable administrative tools.

The dcecp program provides several convenience variables that substitute for previously typed information or command output. All of the convenience variables begin with an _ (underscore) to leave one-character variable names free for other uses.

The following topics describe the convenience variables. Their order of presentation generally keeps similar or related variables together.

More:

Current Principal (User) Name (_u)

Current Cell Name (_c)

Current Host Name (_h)

Most Recent Operation Argument Name (_n)

Parent of the _n (_p)

Last dcecp Object Name (_o)

Last Operation's Return Value (_r)

DCE Servers to Use (_s(xxx))

Last Security Server Used (_b(sec))

Most Recent Error Code (_e)

CDS Confidence Level (_conf)