
On 16.05.13 12:56, Toby Corkindale wrote:
If you ultimately do have to script terminal sessions, the only tool I know of is expect. Here's the Debian package description.
Thanks, however I'm aware of expect. It completely fails my requirement that the terminal remain completely interactive.
Certainty that a thing cannot be done is often the surest guarantee of failure. Is the inadequacy of Expect's "interact" command completely certain? In chapter 15 of O'Reilly's "Exploring Expect" (1996 edition), enough is claimed, to suggest that a skilled scripter could craft a fully interactive interface to multiple applications, with canned responses triggered by user or application input: » The "interact" command is much more flexible than that [chapter 3] example demonstrated. "interact" can also: o execute actions when patterns are seen from either a user or a spawned process o allow the user to take control of a spawned process, and return control to the script for further automated interaction, any number of times o suppress parts or all of an interaction o connect two or more spawned processes together, pairwise or in other combinations « But if the ability to switch between interactive and scripted, plus user or process initiated canned responses, is not enough, then we need a better description of the use-case, I figure. Erik (Who hasn't used this stuff for a decade or so.) -- No one really listens to anyone else, and if you try it for a while you'll see why. - Mignon McLaughlin