PreviousNext

Lists of Lists

The DCE control program interpreter relies on list structures as a way to parse command input and return command output. For instance, the -remove option in the following example uses a list to group the attribute and value parts of the option argument together. The example is a command that removes some ACLs from an object called /.:/foo:

acl modify /.:/foo -remove {user melman}

Because the -remove option uses a list structure to group attributes and values in the option argument, it can take a list of ACL entries as in the following example, which removes the user ACL entry for the principals melman and salamone.

acl modify /.:/foo -remove {{user melman} {user salamone}}

Lists of one value that do not contain spaces do not need braces. The string syntax of an ACL entry allows the type and key to be separated by a colon (:), so the following are valid:

acl modify /.:/foo -remove user:melman
acl modify /.:/foo -remove {user:melman user:salamone}

If there is only one ACL entry given, that is, the -remove option's value has only one element (and that element does not contain spaces), then braces are not needed to delimit the list. The following values are valid, but all are examples with unnecessary braces:

acl modify /.:/foo -remove {{user melman}}
acl modify /.:/foo -remove {{{user melman}}}
acl modify /.:/foo -remove {user:melman}
acl modify /.:/foo -remove {{user:melman} {user:salamone}}