Execommand(); Filtercommand() - IBM Prerequisite Scanner User Manual

Table of Contents

Advertisement

Syntax
dictionaryToString(dic)
Input parameters
Dictionary dic
Return values
String result

exeCommand()

Executes the specified command and returns the result from that command's
execution.
Purpose
This function executes the command input parameter. If there are any errors, it
calls the logWarning sub routine to display the errors; otherwise, it returns the
result from that command's execution.
Syntax
exeCommand(cmd)
Input parameters
String cmd
Return values
String result

filterCommand()

Executes the specified command and returns the lines from the result of the
command that match the specified pattern.
Purpose
This function executes the command input parameter. It parses the result from that
command's execution and checks whether any line from the result matches the line
pattern input parameter. If there is a match, it calls the "getFirstMatch()" on page
121 function to determine whether there's also match between the information line
input parameter and the command's result. If there is, it then uses the Join
function to return the contents of the dictionary object from the getFirstMatch()
function.
Syntax
filterCommand(cmd, line_patt, after_line, info_patt)
Contains the dictionary object.
Returns a string representation of the dictionary object, with each key and item
separated by an equals symbol.
The name of the command to execute.
Returns a string that contains the result from that command's execution.
Appendix E. Common functions for Windows systems
117

Advertisement

Table of Contents
loading

Table of Contents