1 |
On Wed, 5 Dec 2018 11:28:55 +1100 Adam Carter <adamcarter3@×××××.com> |
2 |
wrote about [gentoo-user] OT expect script question: |
3 |
|
4 |
> expect { |
5 |
> "string1" { <actions1> } |
6 |
> "string2" { <actions2> } |
7 |
> "*" { <actions3> } |
8 |
> } |
9 |
|
10 |
From |
11 |
<https://www.oreilly.com/library/view/exploring-expect/9781565920903/ch04.html> |
12 |
|
13 |
--- |
14 |
expect * |
15 |
Here the * matches anything. This is like saying, ?I don?t care what?s in |
16 |
the input. Throw it away.? This pattern always matches, even if nothing is |
17 |
there. Remember that * matches anything, and the empty string is anything! |
18 |
As a corollary of this behavior, this command always returns immediately. |
19 |
It never waits for new data to arrive. It does not have to since it |
20 |
matches everything. |
21 |
--- |
22 |
|
23 |
Could it be that it just matches empty without waiting for anything? |
24 |
|
25 |
|
26 |
cu |
27 |
Gerrit |