ruby expect no interact ?

Discussion in 'Ruby' started by Une Bévue, Jul 5, 2011.

  1. Une Bévue

    Une Bévue Guest

    i don't see any interact example within ruby expect; is this not
    implemented yet ?

    ie to mimic :

    #!/sw/bin/expect -f

    spawn ssh -6 mfj@Gericom
    expect "Password: "
    send "THE password\n"
    expect "imyt-2-% "
    interact {
    \003 {send_user "exiting, bye!\n";send "exit\n";exit}
    }

    here i open an SSH connexion and leave the user, me, do what he want
    until he pressed CTRL C to exit.
     
    Une Bévue, Jul 5, 2011
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.