Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/expect
- set FILEPATH1 $1
- spawn sh "scp $FILEPATH1 $USER@$HOST:/destination/files"
- set pass "pass123"
- expect {
- password: {send "$passr"; exp_continue}
- }
- FILEPATH1=$1
- set FILEPATH1 $1
- set FILEPATH1 [lindex $argv 0]
- spawn scp $FILEPATH1 $USER@$HOST:/destination/files
- spawn scp $FILEPATH1 $env(USER)@$env(HOST):/destination/files
- set timeout -1
- expect {
- password: {send "$passr"; exp_continue}
- eof
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement