Re: expect: how to clear expect_out(1,string)
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: expect: how to clear expect_out(1,string)

From: <andyhaupt@netscape.net>
Date: Tue Mar 07 2006 - 11:29:28 CET

Hello Uwe,

if in your first post you would have reversed the order of the first
two inputs
ie. first input is 'pat1pat2' and second input is just 'pat2'
you would have seen what I mean:
after the second input you still see expect_out(1,string) filled with a
value
(if you adapt your code and also loop through 0,1,2,3)
in fact it is the previous one and it is not cleared.
my question was: is there a way to clear it.

I'm ok with the alternative solution of having a sequence of patterns
(which is also probably easier to understand) but I wanted to know if
the '(pat1)?(pat2)' method and thus having to clear
expect_out(1,string) can be achieved.

rgds
andy
Received on Sun Apr 30 02:25:32 2006