HP (Hewlett-Packard) HP OpenView Vantagepoint – Operation Manual for UNIX Printer User Manual


 
Syntax Used in VPO Configuration Files
Syntax for Message Pattern Matching
Appendix A 293
Assign-to-
Variable
Operator
In addition to being able to use a single expression, such as <*> or <#> to
assign a string to a variable, it is also possible to use the assign-to-variable
operator to build up a complex sub-pattern composed of a number of
operators. The assign-to-variable operator uses the same square brackets
as in other bracket expressions.
The basic pattern is: <[sub-pattern].var>
Example 1:
<[<@>file.tmp].fname>In this example, the dot between file and tmp
matches a dot character, while the dot between ] and fname is necessary
syntax. This pattern would match a string such as Logfile.tmp and
assign the complete string to fname.
Example 2:
<[Warning|Error].var>This pattern matches any instance of the string
Warning or the string Error found in the message text. The message
text: Warning and Error: Shutdown would therefore cause the string
Warning to be assigned to var. Note that the first instance of a matched
string is assigned.
Example 3:
<[Error[<#.n><*.msg>]].complete>In this case, any line containing the
word Error followed by a number, has the number assigned to the
variable n and any further text assigned to msg. Finally, both number and
text are assigned to complete.
Table A-2 VPO Pattern Matching Language
Component Description