From: Adam Carter <adamcarter3@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] OT expect script question
Date: Wed, 5 Dec 2018 11:28:55 +1100 [thread overview]
Message-ID: <CAC=wYCF_+Wk+ujgSBJptARBjx3mxzME1=PNcPujAq6YF=2Znfw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 514 bytes --]
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> }
}
[-- Attachment #2: Type: text/html, Size: 743 bytes --]
next reply other threads:[~2018-12-05 0:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-05 0:28 Adam Carter [this message]
2018-12-05 7:40 ` [gentoo-user] OT expect script question Gerrit Kühn
2018-12-06 2:31 ` Adam Carter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAC=wYCF_+Wk+ujgSBJptARBjx3mxzME1=PNcPujAq6YF=2Znfw@mail.gmail.com' \
--to=adamcarter3@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox