Does anyone have an example of working code using the 'Expect' library (under Unix) that actually does something?
I know about: http://src.openresources.com/debian/src/interpreters/HTML/R/Expect_Init.html
I also know about the MAN pages the show how to initialize the process. I'm looking for something that performs a 'wait'-type function in Expect (waiting to respond to a system prompt such as a login process or remote command prompt).
I will also entertain suggestions to use something OTHER than Expect to do the same job.
A copy and paste solution will work if you already have code.
I will not accept answers in Perl (I'm attempting to avoid it). Answers must be in C or C++.
Please post all as comments and I will choose an answer from comments.