Question regarding Expect

Question regarding Expect

Post by <gshe.. » Thu, 10 Jul 2003 20:27:00



I am using perl's telnet to collect data on a TL1 connection, the waitfor
option doesn't seem to work.

I need to know how to setup expect in order to watch for a ';'  (witch
indicates the end to a reply from the TL1 connection) and then proceed to
the next command, which will be another perl telnet command.

As you can see, I am new to this! Any assistance appreciated,

George

 
 
 

1. Expect: expect vs. interact

Hey Don or any other expect person:

For comparable uses, which is faster, expect or interact, or is there
any difference?

By comparable, I mean:
    expect {
        -re .+ {
            send_user -raw -- $expect_out(buffer)
            exp_continue
        }
        -i $user_spawn_id -re .+ {
            send -- $expect_out(buffer)
            exp_continue
        }
    }

vs.

    interact

or (I know, slightly different semantics)

    expect {
        "crap" { exit }
        -re .+ {
            send_user -raw -- $expect_out(buffer)
            exp_continue
        }
        -i $user_spawn_id -re .+ {
            send -- $expect_out(buffer)
            exp_continue
        }
    }

vs.

    interact {
        "crap" { exit }
    }

--

http://www.ugcs.caltech.edu/~huyle

2. Looking for a SNMP agent running on both Solaris and SCO

3. Expect/Tcl Problem - "scripts expect Tcl version..."

4. Help for Cyrrus card

5. expect and expecting it this way or this way...?

6. What is kernel version 2.2.16-22smp??

7. How to compile EXPECT was WANTED expect for Linux

8. Internal Server Error - Apache

9. expect for AIX where can I find freeware.expect.rte

10. expect-send pairs and sub expect-send pairs in chat

11. Expect: How to expect clear screen

12. tar-question: reached end-of-file before expected ???

13. question/problem about forking in expect