From: Roland G. <RGi...@cp...> - 2003-08-13 06:50:36
|
> I issue command2 with both a pattern match and a timeout. I find that > when the output from command1 contains the pattern match, the expect() > call for command2 terminates before it's looked at the output from > command2, and I essentially get out of sync with commands and command > output. > > I tried clear_accum() between command1 and command2, but before() was > not altered, and the problem persists. Have you actually seen this with $Expect::Exp_Internal=1;? I would guess that command1 is still running (as you don't wait for it) and still produces output while you are already expecting for patterns for command2 (which isn't even running at this time). The right way is to wait for the (shell) prompt that indicates completion of command1 before issuing another command... Hope this helps, Roland -- RGi...@cp... |