- #!/usr/bin/expect -f
- # connect via scp
- spawn scp [lindex $argv 0] [lindex $argv 1]
- #######################
- expect {
- -re ".*es.*o.*" {
- exp_send "yes\r"
- exp_continue
- }
- -re ".*sword.*" {
- exp_send "mypassword\r"
- }
- }
- interact
SHARE
TWEET
expect
a guest
Oct 8th, 2012
25
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data

