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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon Strandgaard

    how to expect eof with expect+pty

    Simon Strandgaard, Dec 20, 2006, in forum: Ruby
    Replies:
    4
    Views:
    366
    Simon Strandgaard
    Dec 20, 2006
  2. Li Chen
    Replies:
    1
    Views:
    159
    Stefan Mahlitz
    Oct 16, 2007
  3. Gerald Bauer
    Replies:
    11
    Views:
    205
    Gerald Bauer
    Aug 14, 2008
  4. Raimon Fs
    Replies:
    11
    Views:
    418
    Raimon Fs
    Feb 25, 2009
  5. Phil
    Replies:
    0
    Views:
    171
Loading...

Share This Page