Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Expect: run a command first before sending

0 views
Skip to first unread message

Tr00tY

unread,
Nov 11, 2009, 10:58:05 PM11/11/09
to
Hello Expect experts,

Is it possible with Expect to run a command first when an expected phrase is
outputted by a spawned program?

Thanks a lot.


Uwe Klein

unread,
Nov 12, 2009, 3:55:38 AM11/12/09
to
would this be what you crave for:

expect \
$myphrase1 {
set suplemental [ phrase1command $expect_out(0,string) x y z ]
} $myphrase2 {
set suplemental [ phrase2command �expect_out(0,string) a b c d ]
}

uwe

0 new messages