Gentoo Archives: gentoo-user

From: Adam Carter <adamcarter3@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] OT expect script question
Date: Wed, 05 Dec 2018 00:29:16
In my response matching I would like to have a catch all so if nothing
specific is matched I can take an action, but when I include the "*"
option, it is selected even if string1 matches. From the expect man page
"In the event that multiple patterns match, the one appearing first is used
to select a body." So why are actions3 getting executed when string1 is
matched? If i remove the "*" section, string1 is matched.

expect {
    "string1" { <actions1>  }
    "string2" { <actions2>  }
    "*" { <actions3> }


Subject Author
Re: [gentoo-user] OT expect script question "Gerrit Kühn" <gerrit.kuehn@×××××××.de>