Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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
Advertisement
Add Comment
Please, Sign In to add comment