HP XP P9000 RAID Manager Reference Guide (T1610-96061, January 2014)

Returned values
The rmawk command sets the following returned values during exit allowing you to check the
execution results.
Normal termination:
0: The command ends normally with the specified condition.
1:
Testing: The specified condition is FALSE.
Waiting: The specified condition is Timeout.
Abnormal termination:
125: The command ends with a syntax error.
126: The command ends with a system error.
Examples
For examples of display, see (page 170).
Examples of comparison expression
@20-eq:PAIR: Compares if the character string in Column #20 from STDIN matches "PAIR".
@20-eq:PSU*: Compares if "PSU" is included in the character string in Column #20 from STDIN.
@0-eq:PSU*: Compares if "PSU" is included in one line from STDIN. This is equivalent to "grep
PSU".
@20-eq:@21: Compares if the character strings in Column #20 and Column #21 match.
@C20-ge:50: Compares if it is "value >= 50" of Column #20 from STDIN.
@L-ge:20: Compares if it is the current "number of lines >= 20" from STDIN.
@C-ge:20: Compares if it is "number of columns >= 20" of the current lines from the STDIN.
@R-gt:0: Compares if it is "return value > 0" of the specified command.
Examples of arithmetic expression
@C8?=ad:@C8: Performs "@C8? = @C8? + @C8". This is equivalent to "@C8+".
@C8=ad:@C5: Performs "@C8? = @C8 + @C5".
@C8=ad:@C5?: Performs "@C8? = @C8 + @C5?".
@C8=ad:30: Performs "@C8? = @C8 + 30?".
@C8=st:30: Performs "@C8? = 30".
@C5=st:@C5: Performs "@C5? = @C5" for converting to the integer.
Example:
Command | rmawk @C8?=ad:@C8 exe="print Total = @C8?"
Command | rmawk exe="print Total = @C8+"
Example of the command option format
Performs the operation by interpreting the specified option format and classifying them in the
following three function formats.
Performs the operation as a filter if there is no "exe="..."" in the specified option.
Command | rmawk [@expression1] Logical operator [@expression2]
Example:
rmawk 129