expect script --error return

From: LHradowy (laura.hradowy_at_NOSPAM.mts.caaaaa)
Date: 11/28/03


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
                }
            }



Relevant Pages

  • Re: HostStatusDirectory
    ... >reason, so I need to write a script that detects this situation and has ... >another go using host #2. ... one of the available smarthosts. ...
    (comp.unix.solaris)
  • Re: HostStatusDirectory
    ... >> reason, so I need to write a script that detects this situation and has ... >> another go using host #2. ... Does it mean a site that accepts a TCP connection, ...
    (comp.unix.solaris)
  • expect script --error return
    ... 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 ...
    (comp.lang.tcl)
  • Re: HostStatusDirectory
    ... > reason, so I need to write a script that detects this situation and has ... > another go using host #2. ... Maybe because some people are too annoyed by top-posting. ...
    (comp.unix.solaris)
  • Re: expect script --error return
    ... LHradowy wrote: ... >I am trying to harden my expect script, and so far I have the "usual prompts ... Business: http://www.Phaseit.net ...
    (comp.programming)