Hi,
I have been working with Pentaho for a while and now i come to a frustrating point.
I want to know if a SSH command failed or not. first of all I tried to use the stdErr output that comes out of the box in the "Run SSH Commands" option, but as a matter of fact it is just returning if there is sdtErr or not from the command i used.
When i use it for example a sqoop command, and stdOut will go also to the stdErr and by that make a false alarm of a failure.
then i tried to use the exit code provided by the bash scripting, for example:
cd FakeFolder ; echo $?
-bash: cd: FakeFolder: No such file or directory
1
and then retrieve the exit code (in that case 1) and see if it is different from 0. But - sometimes pentaho will "push" the exit code, or basically any command after the original one to be written befor the stdOut of the original command.
now i am completely out of hand - > how can i get the true exit code, or a true state of the ssh command of been successful or not?
I have been working with Pentaho for a while and now i come to a frustrating point.
I want to know if a SSH command failed or not. first of all I tried to use the stdErr output that comes out of the box in the "Run SSH Commands" option, but as a matter of fact it is just returning if there is sdtErr or not from the command i used.
When i use it for example a sqoop command, and stdOut will go also to the stdErr and by that make a false alarm of a failure.
then i tried to use the exit code provided by the bash scripting, for example:
cd FakeFolder ; echo $?
-bash: cd: FakeFolder: No such file or directory
1
and then retrieve the exit code (in that case 1) and see if it is different from 0. But - sometimes pentaho will "push" the exit code, or basically any command after the original one to be written befor the stdOut of the original command.
now i am completely out of hand - > how can i get the true exit code, or a true state of the ssh command of been successful or not?