Gentoo Archives: gentoo-user

From: "Gerrit Kühn" <gerrit.kuehn@×××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] OT expect script question
Date: Wed, 05 Dec 2018 07:40:13
Message-Id: 20181205084000.8b4d17ba35765ec691795c66@aei.mpg.de
In Reply to: [gentoo-user] OT expect script question by Adam Carter
On Wed, 5 Dec 2018 11:28:55 +1100 Adam Carter <adamcarter3@×××××.com>
wrote about [gentoo-user] OT expect script question:

> expect { > "string1" { <actions1> } > "string2" { <actions2> } > "*" { <actions3> } > }
From <https://www.oreilly.com/library/view/exploring-expect/9781565920903/ch04.html> --- expect * Here the * matches anything. This is like saying, ?I don?t care what?s in the input. Throw it away.? This pattern always matches, even if nothing is there. Remember that * matches anything, and the empty string is anything! As a corollary of this behavior, this command always returns immediately. It never waits for new data to arrive. It does not have to since it matches everything. --- Could it be that it just matches empty without waiting for anything? cu Gerrit

Replies

Subject Author
Re: [gentoo-user] OT expect script question Adam Carter <adamcarter3@×××××.com>