AnsweredAssumed Answered

Treating ssh command output

Question asked by eniomarques on Sep 26, 2013
Latest reply on Oct 9, 2013 by Tom_Kouhsari
Hello everyone!

I'm creating an automation for Weblogic deploys. The PAM will call the scripts using the 'Run SSH Command' operator, which are shell scripts with wlst calls.

In my tests, I'm successfully calling the scripts, and I can see its results in the Opeartion Results -> SSHCommandsOutput, but somehow there's some extra prompt lines on it, like
Return OK
I tried some java script to treat the output, but with no sucess:
Process.ResultCommand = Process[OpName].SSHCommandsOutput[0];
                var ResultSet = ResultCommand.split("\n");
                for (var x=0; x < ResultSet.length; x++) {
                               ResultSet[x] = ResultSet[x].replace(/^\s+|\s+$/g,"");
                                if (!isNaN(ResultSet[x])){
                                                               if (parseFloat(ResultSet[x]) > 0){
                                                                              Process.commandOk = parseFloat(ResultSet[x]);
Also, I'd like to attach the result to a custom result in the script operator.

Can you guys please help me out?