Re: expect script --error return
From: LHradowy (laura.hradowy_at_NOSPAM.mts.ca)
Date: 12/02/03
- Next message: CBFalconer: "Re: Any experience with "The Last One"?"
- Previous message: Edward G. Nilges: "Re: Programmer's unpaid overtime."
- Next in thread: Cameron Laird: "Re: expect script --error return"
- Reply: Cameron Laird: "Re: expect script --error return"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 1 Dec 2003 22:13:09 -0600
"Cameron Laird" <claird@lairds.com> wrote in message
news:vsk0otlrmtb32d@corp.supernews.com...
> In article <CFNxb.28716$MW5.41790@news1.mts.net>,
> LHradowy <laura.hradowy@NOSPAM.mts.caaaaa> wrote:
> >I am trying to harden my expect script, and so far I have the "usual
prompts
> >covered" but what happens if for some reason the host that the expect
script
> >is logging into changes its screens? How can I account for that?
> .
> .
> .
> Yes.
>
> This is exactly the role of [expect]s's "timeout" keyword.
>
> You'll be best off to find your own copy of the Expect book.
> (Nearly) all answers are there.
>
> Rough sketch:
> expect {
> {first pattern} {
> do one thing
> }
> {second pattern} {
> do another thing
> }
> timeout {
> puts "See? We didn't detect any recognized pattern."
> }
> }
> --
>
> Cameron Laird <claird@phaseit.net>
> Business: http://www.Phaseit.net
Thank you, I thought that was what I needed to do. I do have you book, and
let me say that it is worse for wear. Many pages are dog ear'd and lots of
post it notes in it. Very good book, I definitely got my moneys worth!
- Next message: CBFalconer: "Re: Any experience with "The Last One"?"
- Previous message: Edward G. Nilges: "Re: Programmer's unpaid overtime."
- Next in thread: Cameron Laird: "Re: expect script --error return"
- Reply: Cameron Laird: "Re: expect script --error return"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|