a guest Jun 14th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- #!/usr/bin/expect -f
- # effectue le transfert par SCP (sur SSH)
- set timeout 3600
- set localfile [lindex $argv 0]
- set distfile [lindex $argv 1]
- set servername [lindex $argv 2]
- set password [lindex $argv 3]
- spawn scp $localfile $servername:$distfile
- expect "password:"
- send -- "$password\r"
- expect "100%"
- exit 0
RAW Paste Data