expect script --error return
From: LHradowy (laura.hradowy_at_NOSPAM.mts.caaaaa)
Date: 11/28/03
- Next message: Bob Halpin: "ActiveTcl 8.430 Install error on Win 98 from CD"
- Previous message: joe: "mclist anybody?"
- 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: Fri, 28 Nov 2003 13:49:49 -0600
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?
Is there a way that if it does not receive any of the prompts listed below,
it puts $FILE error, then continues on with the script?
expect {
"200? \\*\\*\\*\r\n>$"
{ change_pass }
"200? \\*\\*\\**\r\n>$"
{ change_pass }
"Invalid user name or password.\r\nEnter User Name\r\n>$" {
puts $PASS_ERROR "$LINE, Invalid user name or passwd,
passwd was not changed."; continue
}
"User logged in on another device, please try again." {
puts $PASS_ERROR "$LINE, had user logged in, passwd was
not changed."; continue
}
}
- Next message: Bob Halpin: "ActiveTcl 8.430 Install error on Win 98 from CD"
- Previous message: joe: "mclist anybody?"
- 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
|