daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/expect -f
  2.  
  3. # effectue le transfert par SCP (sur SSH)
  4. set timeout 3600
  5.  
  6. set localfile [lindex $argv 0]
  7. set distfile [lindex $argv 1]
  8. set servername [lindex $argv 2]
  9. set password [lindex $argv 3]
  10.  
  11. spawn scp $localfile $servername:$distfile
  12. expect "password:"
  13. send -- "$password\r"
  14. expect "100%"
  15. exit 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top