I have searched online and in this forum but can’t seem to find the correct solution to my peculiar problem.
So, I am interacting with a server via SSH terminal connectio and using GetText activity to read the screen. I send a command like "&& echo “pass” || echo “fail” to check if a file was found. If this returns pass, then it’s the line immediately after that command. If returns fail, then there is a line like "-Bash: [: missing ‘]’ before fail is displayed.
How do I read this value returned to determine it if’s a pass or fail?
IN ADDITION:
this sort of command is sent twice during this interaction. How will I get the value of the second pass/fail check since there will now be multiple “echo” commands on that screen?
I hope my question is clear. Any help is appreciated :).