OSF DCE Administration Guide--Core Components

Using the DCE Control Program Command Language
dcecp> puts $_u
cell_admin
A practical use of this variable could be in scripts that test for a certain DCE identity
before proceeding. On finding an incorrect identity, scripts could prompt for the
necessary identity information and perform a dce_login operation.
See the cell name variable description in Section 2.6.2 for information about composing
fully qualified principal names.
2.6.2 Current Cell Name (_c)
The _c convenience variable holds the name of the cell in which the principal is
registered. 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.
dcecp> puts $_c
/.../my_cell.goodco.com
dcecp>
This variable is generally useful in environments where administrators deal with multiple
cells. For example, you could use the _c variable as a building block in constructing the
current context’s fully qualified principal name for use in scripts. Join the cell name and
user name variables together with a / (slash) as shown in the following example:
dcecp> puts $_c/$_u
/.../my_cell.goodco.com/cell_admin
dcecp>
2.6.3 Current Host Name (_h)
The _h convenience variable holds the DCE name of the current host. The DCE control
program sets this variable when dcecp is invoked. Setting it using set generates an error.
dcecp> puts $_h
hosts/planets
dcecp>
The _h variable is useful for returning the name of the host to an interactive user. You
can also use it with the _c variable, as shown, to construct names such as a host principal
name in a script:
dcecp> puts $_c/$_h/self
/.../my_cell.goodco.com/hosts/planets/self
124243 Tandem Computers Incorporated 29