Hi,
For a long time, I've been using:
expect.expect(contains("#"));
to wait for the system prompt, but I've been lucky. Today I found that unexpected results occurred when I found a "#" in the middle of the output of a command.
I'm surprised this hasn't happened before, but it's probably because I'm not usually very dependent on the responses from the system.
Regardless, I'm wonder if there's a best way to wait for a prompt. I have considered parsing out and then looking for the full prompt (i.e. hostname#), but I think this could present other complications.
If there's a smarter way, I'd appreciate the help.
Thanks,
Jon