6.4.13 Specifying Output Filter
This section describes how to store the standard output of a command or script in an output property.
By defining a PCRE-compliant regular expression in the Output Filter field, you can extract character strings from the standard output and standard error output of a command or script, and store them in the output property of a plug-in.
- Important
If you specify multiple groups in the regular expression, only values that match the first group are stored in the output property of the plug-in.
If the regular expression applies to multiple value ranges, only the first range of values is stored in the output property of the plug-in. Multiple value ranges cannot be stored in an output property.
The following describes how to specify a regular expression that stores the standard output of a command or script in an output property:
Key: output01
Output Filter: DATE=(.*)
When you specify an output filter in this way, the value immediately following DATE= in standard output is stored in the output property output01.
To store the return value of a script in an output property, define the plug-in and create a script as follows:
In the Platform , specify the Script option for Execution Method.
Create a script whose standard output displays the return value of the command or script in a format that is filtered by the regular expression specified in the output filter.