UNPKG

258 Bapplication/x-shView Raw
1#!/usr/bin/expect
2
3set ip [lindex $argv 0]
4set port [lindex $argv 1]
5set sopPath [lindex $argv 2]
6
7set timeout 1000
8spawn scp -P $port $sopPath developer@$ip:/tmp
9expect {
10 "(yes/no)?" {send "yes\r"; exp_continue}
11 "assword:" {send "system\r"}
12}
13expect eof
\No newline at end of file