I would like to use expect to parse through the contents of a file, something like this:
spawn cat log/mylog.txt
expect {
-re "some_expr" { ...do something... }
default { ...do something else... }
Note that I am simply reading a file, so there is nothing really interactive...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.