by executing "discovery.runCommand()" a new node with type "DiscoveredFile" is created in the datastore. This node is assigned to the variable Output.
If you want to access the content of the discovered file, you need to use Output.content.
Thanks for your response, do I need to change my text.split from text.split(Output,':') to text.split(Output.content,':'), in order to be able to split the contents of the files to the values that are needed?
1 of 1 people found this helpful
Why do both discovery.fileGet and discovery.runCommand?
discovery.fileGet will get the contents of the file is it exists. You really just want something like
file := discovery.fileGet(host, "/etc/host-database");
if file and file.content then
FieldPaths := text.split(file.content, ":");
Thanks for the response, I'll give it a try and will let you know of the results.