<Command> element
The <Command> element defines the base command used to perform the operation defined by the parent element.
Syntax
Parent element: <Get>, <Set>, <Diff>, <Discover>, <PrereqDef>, <Prereq>, <PropertyDef>, <Property>, <Command>
Usage
The content of the <Command> element is expanded as described in section Expansion of command line elements and combined with the other command line elements to form a complete command line. See section Command line generation for more details.
Some characters often found in shell expressions, such as <, > and & are not allowed in XML documents. These characters must be replaced by the corresponding XML entity:
Character | XML entity |
---|---|
< | < |
> | > |
& | & |
Alternatively, a CDATA section can be used if the expression contains many of such characters. The CDATA sections start with <![CDATA[ and ends with ]]>.
The <Command> element must be defined for each supported operation of each parameter, either at the <CfgMethod> level or at the <ParameterDef> level.
Example
The envParam.xml catalog defines a parameter called profile that represents the contents of the /etc/profile file. For this parameter, the <Get> element uses the cat command to capture the content of the /etc/profile file:
<ParameterDef name="profile">
<Get type="current">
<Command>/usr/bin/cat /etc/environment</Command>
</Get>
</ParameterDef>