"Expect" and different input.
Ken D'Ambrosio
ken at jots.org
Tue Jan 14 19:05:49 UTC 2020
Hey, all. I suck at Expect. (And I realize this isn't, strictly
speaking, an Ubuntu question, but figured there might be someone here
who *doesn't* suck at Expect.) I'm trying to write a wrapper for my VPN
client -- and *sending* stuff is easy. But it doesn't always work. So
I'm presented with (for the sake of argument):
* Successful execution (which actually means waiting for external
multi-factor authentication ("MFA") input via an app on my phone before
exiting)
or
* Failed execution, "connection failed" somewhere in the text, and being
prompted for my username again.
How do I tell Expect to try again if I don't get prompted for MFA?
Thanks!
-Ken
More information about the ubuntu-users
mailing list