Future.runCommand(target, command, path_to_command)
Returns a DiscoveredCommandResult node containing the result of running the specified command. Enables command paths to be restricted.
Future.runCommand function is similar to
discovery.runCommand but has an additional parameter specifying the path to the command. The new parameter is intended to be merged with
discovery.runCommand in a future release, and the
Future.runCommand function deprecated.
command is the command to run.
path_to_command parameter is the path to the command including the command itself, without arguments.
Where the function encounters short 8.3 format paths on Windows, it expands them to the full path. To determine the full path, it will run additional commands.
target node can be one of the following:
The following table compares existing discovery.runCommand function call with their
|Existing discovery.runCommand||Equivalent Future.runCommand||Source of example (TKU pattern module)|
Possible post-processing required on UNIX/Linux hosts
When a pattern executes a command on a UNIX/Linux host, the result returned can contain control characters used to display colours and other formatting. The pattern should not rely on being able to use the result without some additional processing such as regular expression matching and extraction.
Log in or register to comment.