Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Expect: looping until there is no more input from spawn



On 11/03/2008, Josh Glover <jmglov@example.com> wrote:

> On 11/03/2008, Edward Wright <edw@example.com> wrote:
>
>  >  Idea #2:
>  >  Use a conditional expect and test for the return value (or eof) in the
>  >  loop, and if so, break out:
>  >
>  >  expect {
>  >     eof {
>  >         break
>  >     }
>  >     your stuff
>  >  }
>
> This should almost certainly work.

Ed, this worked like a charm! Thanks, and I owe you a pint (and not
Budweiser, either--unless it is the Czech one!).

-- 
Cheers,
Josh


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links