add (7)
Attempts to add a new file property/value combination to selected systems. No action will be taken unless at least one system is selected.
Please note that using this command will re-indent and remove all comments from the selected systems’ UDA files. It is recommended that you choose a single approach to working with UDA:
-
Editing by hand, trading complexity for being able to use the full feature set of UDA.
-
Editing via the CLI, which is less complex but does not allow advanced features such as multiple assignment groups.
usage: cmri system file-property add <--name PROPERTY_NAME> <--value PROPERTY_VALUE> <--expressions EXPRESSIONS>
required arguments:
|
The name of the file property to add or modify. If the file property is not defined, a corresponding file property definition will be added to the system’s user-defined architecture. If the file property to be added exists already the provided value will be added to the file property. If the file property/value combination exists already the provided expressions will be appended to the end of the file property’s assignment group. |
|
The property value to add/modify. |
|
A comma-separated list of expressions matching files to assign the file property. See the Expressions section below for details. |
Expressions
Expressions are evaluated in the order they appear. Take for example two expression lists: *,~*.h
and ~*.h,*
. The former will include every file, then exclude all files beginning with *.h
whereas the latter would simply include every file, as the exclusion happens before the inclusion.
Expressions beginning with ~
are treated as exclusions; to begin an expression with a literal ~
prefix the expression with \
. For example, the literal ~thingstartingwithtilde
must be provided as \~thingstartingwithtilde
.
Expressions beginning with $
are reserved for future use; to begin an expression with a literal $
prefix the expression with \
. For example, the literal $thingstartingwithdollar
must be provided as \$thingstartingwithdollar
. At the time of writing expressions beginning with $
are unsupported, their presence in an expression list will result in the command failing with an error.
Commas, themselves, may be escaped by surrounding the expression in quotes. For example, -e '"some,path/*",other/*'
would result in 2 expressions:
-
some,path/*
-
other/*
To escape double-quotes, surround the expression in quotes and use 2 adjacent quote characters inside:
"""escaped double quotes"""
resolves to "escaped double quotes"