PreviousNext

Last Operation's Return Value (_r)

The _r variable holds the return value of the most recent operation. Many dcecp commands return multiple lines of output which are in the form of a list.

The following example shows one use of the _r convenience variable. The dts show command returns multiple lines as a list. The attrlist getvalues operation (see the attrlist(8dce) reference page) searches through the returned list for the string toofewservers and returns its associated value.

dcecp> dts show -counters
{creationtime 1994-09-16-07:50:13.067-04:00I-----}
{nointersections 0}
{nointersections 0}
{diffepochs 0}
{toofewservers 1}
{providertimeouts 82}
{badprotocols 0}
{badtimerep 0}
{noglobals 81}
{noresponses 0}
{abrupts 0}
{epochchanges 0}
{syserrors 0}
{syncs 1574}
{updates 0}
{enables 1}
{disables 0}
{nomemories 0}
{providerfailures 0}
{badlocalservers 0}
{badservers 0}
dcecp> attrlist getvalues $_r -type toofewservers
1
dcecp>