Top
Systemwalker Runbook Automation Studio User's Guide
Systemwalker

6.4.8 Extract lines Filter

This filter finds rows in the results of an operation component or in filter output that meet specified conditions and extracts them.

Line extraction method

Select the conditions for extracting the row from the following:

  • All lines starting with the target string

  • All lines ending with the target string

  • All lines containing the target string (Default)

  • All lines that do not contain the target string

  • Line to be specified

  • First line

  • Last line

  • n lines from the start

  • n lines from the end

Target string

Enter the string used to extract rows. The input can be up to 512 characters long. To embed the variable (UDA) value and execution results of the previous operation component in the Target string field when the filter is applied, follow the steps below:

  • To embed the value, specify "@{uda:UDA name}") or click the Browse variables button and select a variable from the Browse variables dialog box.

    The type of variable (UDA) available is STRING.

  • To embed the execution results of the previous operation component, specify "@{:node name:execution results}" or click the Browse execution results button and select an execution result from the Browse execution results dialog box.

The filter will end in an error if the field is empty.

Line number/Number of lines

Enter row numbers for the rows to extract or enter a number of rows between 1 and 2147483647.To embed the variable (UDA) value and execution results of the previous operation component in the Line number/Number of lines field when the filter is applied, follow the steps below:

  • To embed the value, specify "@{uda:UDA name}") or click the Browse variables button and select a variable from the Browse variables dialog box.

    The types of variables available are STRING and INTEGER. An error will occur if a non-numeric value is specified for a STRING type variable (UDA).

  • To embed the execution results of the previous operation component, specify "@{:node name:execution results}" or click the Browse execution results button and select an execution result from the Browse execution results dialog box.

Use regular expressions

Select when regular expressions are to be used in the Target string field.

The default is off.

Use this field only if strings to be specified are in Line extraction method. (This is grayed out if unavailable)

Use case sensitivity

Select to distinguish between upper and lower case when searching for the string. The default is off.

Use this field only if strings to be specified are in Line extraction method. (This is grayed out if unavailable)

Note

Precautions when Testing Filters

  • If "@{uda: variable name}" is specified in the Line number/Number of lines field:

    The test will use the value assigned in the Set test variables dialog box (*1), or 1 if no value is assigned.

  • If "@{:node name:execution results}"is specified in the Line number/Number of lines field:

    The test will use the value assigned in theSet test variables dialog box (*1), or 1 if no value is assigned.

  • If "@{uda: variable name}"is specified in the Target string field:

    The test will use the value assigned in the Set test variables dialog box (*1), or the string "@{uda:variable name}" if not value is assigned.

  • If "@{:node name:execution results}" is specified in the Target string field:

    The test will use the value assigned in the Set test variables dialog box (*1), or the string "@{:node name:execution results}" if no value is assigned.

  • If either "@{uda:variable name}" or "@{:node name:execution results}" is specified in the Target string field, Use regular expressions is ignored.

  • When the filter is applied on the Management Server, these variables (UDA) or execution results are replaced with the stored values.

*1: Refer to "6.3.2 Testing Filters" for information on the Set test variables dialog box.

Example 1:

Input:

AAAA.AAAA[linefeed]
AAAA$BBBB[linefeed]
AAAA.CCCC[linefeed]
AAAA@DDDD[linefeed]

Extraction method for rows

All rows starting with the specified string

Specified string:

AAAA.

Use regular expressions:

Off

Match case:

Off

Output:

AAAA.AAAA[linefeed]
AAAA.CCCC[linefeed]
Example 2:

Input:

AAaa.AAAA[linefeed]
AAAA$BBBB[linefeed]
AAAA.CCCC[linefeed]
AAaa@DDDD[linefeed]

Extraction method for rows

All rows starting with the specified string

Specified string:

AAaa.

Use regular expressions:

On
* When regular expressions are used, dots are considered to be a character in the target string.

Match case:

On

Output:

AAaa.AAAA[linefeed]
AAaa@DDDD[linefeed]
Example 3:

Input:

AAAA[linefeed]
BBBB[linefeed]
CCCC[linefeed]
DDDD[linefeed]
EEEE[linefeed]

Extraction method for rows

n rows from the first row

Row Count:

3

Output:

AAAA[linefeed]
BBBB[linefeed]
CCCC[linefeed]