[rancid] Re: Can someone tell me why the second expect isn't being executed ?
Austin Schutz
tex at off.org
Tue May 20 22:01:22 UTC 2008
On Tue, May 20, 2008 at 01:41:02PM -0800, Mr. James W. Laferriere wrote:
> Hello All , This one is not making sense to me , expect see's
> "$prompt" & and sends "show version\r" , But neither see's the regexp
> "^Image.stamp.*" nor (of course) follows up with the send ...
> Any insights are helpful . Tia , JimL
>
> send "\r"
> expect {
> "$prompt" { send "show version\r" }
> -re "^Image.stamp.*" { send "this stinks\r\n\n" }
^
I would suspect the anchor is probably not valid, since the buffer
probably contains data before that. A health dose of the -d flag (sets
exp_internal) would help show what is being matched.
Austin
More information about the Rancid-discuss
mailing list