[expect] using the previous output as input

kostas_at_hotmail.nospam
Date: 08/12/04


Date: Thu, 12 Aug 2004 17:58:11 +0000 (UTC)

Hello!

How can i use the output of the remote program as the input
of an expect send clause?

For example, the remote program responds with:

My name is lampros

(while "lampros" is a totally random name)

I want to send back to the remote program something like:

Hello, lampros and have a nice day.

How can I accomplish that?

Thanks



Relevant Pages

  • Re: [expect] using the previous output as input
    ... > The remote program sends two type of answers but in no known order. ... There is no obligation that the name preceds the time answer ... You don't need a while clause; you rather need to "expect various ...
    (comp.lang.tcl)
  • Re: [expect] using the previous output as input
    ... The remote program sends two type of answers but in no known order. ... Obviously I need a while clause that will try to capture these events. ... An excerpt from the code: ...
    (comp.lang.tcl)