HP OO Remote Command Execution SSH v2 SSH Shell and regular expressions
I would like to use OO's SSH client to perform management on some machines. However, the expect-instruction seems limited to some degraded regular expression. For instance
is a valid expression, but
are not. Yet,
are valid expressions. The letter a is part of the output my SSH Shell sees, when I do the testing.
I recognise an invalid regular expression by a timeout after 20 seconds and a result containing "Script did not fully finish, had: 1 commands left" Depending on how many commands are left, one can tell which regex the parser did not like.
Ultimately I would like to replace a with a more complex regular expression. How can I make SSH Shell wait until it sees a?
There is a similar question on this topic.
It would seem that with the expect instruction of the SSH Shell operation the entire output must match the provided regex. Hence, the regex of
must be read as
matching only if the entire output is precisely 'a'.