4.10.12 Search Text
Function
This plug-in searches for the specified keyword in the specified text file in a Windows or Linux environment.
This plug-in searches for the specified keyword in the text (input text) of the specified text file (input file) and then extracts the rows that contain the keyword.
An example of how to perform a search is shown below.
- Input text:
num,family,poolID,capacity,usageRate
1,VSP,0,7225344,0
2,VSP,1,100423680,5
3,VSP,100,4085760,0
4,VSP,11,6150144,11
- Search results when the keyword is '00':
2,VSP,1,100423680,5
3,VSP,100,4085760,0
The search results are output to a file (output file).
The value of the property common.findResult indicates whether the search returned any results for the specified keyword. If the value of the property is "true", the search returned one or more results. If the value of the property is "false", the search returned no results.
This plug-in requires the following server:
- Execution-target server
A server on which this plug-in is executed
Use situation
This plug-in can be used to search the text output from another plug-in.
Prerequisites
For the most recent information about the prerequisite products for the system, prerequisite products for the execution-target server, and the supported OSs for the execution-target server, see the Release Notes.
Prerequisite product for the system:
Job Management Partner 1/Automatic Operation 10-50 or later
Prerequisite products for the execution-target server:
None.
Supported OSs for the execution-target server:
(1) Windows Server 2008 Standard/Enterprise (x86/x64), Windows Server 2008 R2 Standard/Enterprise/Datacenter
(2) Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter
(3) Red Hat Enterprise Linux 5 Advanced Platform (x86), Red Hat Enterprise Linux 5 (x86), Red Hat Enterprise Linux 5 Advanced Platform (AMD/Intel 64), Red Hat Enterprise Linux 5 (AMD/Intel 64)
(4) Red Hat Enterprise Linux Server 6 (32-bit x86), Red Hat Enterprise Linux Server 6 (64-bit x86_64)
Conditions for using the execution-target server:
None.
Cautions
(1) When specifying property values, do not specify any string that includes a single quotation mark (') or double quotation mark ("). If you specify such a string, this plug-in terminates abnormally.
(2) To execute this plug-in in a Linux environment, when specifying property values, do not specify any value that includes any of the characters below. If you specify a value that includes such a character, this plug-in will not return correct search results.
, $, \, or `
(3) When specifying the keyword (the property common.keywordStr), you cannot use regular expressions.
(4) Do not specify the same path for the input file path (the property common.inputFilePath) and the output file path (the property common.outputFilePath). If you specify the same path, this plug-in terminates abnormally.
(5) To execute multiple instances of this plug-in concurrently, do not specify the same output file.
(6) If "false" is specified for the property common.flagOverwriteOutputFile (which specifies whether the output file can be overwritten) and the output file already exists, this plug-in terminates abnormally.
(7) If the input file contains no input text, this plug-in terminates normally.
Version
01.50.00
Category
OperatingSystem/Common/Basic
Plug-in name displayed in the task log
osFindString
Return code
0: Normal
12: Error (Mistake by user): Invalid property
23: Error (Invalid environment): The environment requirements are not met.
27: Error (Check the task log for details of the error): Unidentified error
41: Error (An error has been detected in the component): Property not entered (An error has been detected in the component script)
Property list
The following table lists the properties:
Property key |
Property name |
Description |
Default value |
I/O type |
Required |
---|---|---|---|---|---|
plugin.destinationHost |
Host name of the execution target server |
Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported. |
-- |
Input |
R |
common.inputFilePath |
Input file path |
Specify the full path of the target file in which the searching-target text was stored. |
-- |
Input |
R |
common.keywordStr |
Keyword |
Specify the string to be found in the input text. You can specify a maximum of 1,024 characters. |
-- |
Input |
R |
common.outputFilePath |
Output file path |
Specify the full path of the target file to which the result of searching is to be output. If the target file does not exist, it will be created. |
-- |
Input |
R |
common.flagOverwriteOutputFile |
Whether to Overwrite Output File |
Specify whether to overwrite the output file if it already exists. To overwrite the existing file, specify "true". If you do not want to overwrite the existing file, specify "false". |
false |
Input |
R |
common.findResult |
Whether Search Results Exist |
Stores whether lines containing the specified keyword exist. If such lines exist, "true" is stored. If such lines do not exist, "false" is stored. |
-- |
Output |
O |
common.returnValue |
Return value for the plugin |
The return value of this plugin stored. |
-- |
Output |
O |