#!/usr/bin/expect -f
set DEFAUTENDPOINT endpoint
set ACCESSKEYID id
set ACCESSKEYSECRET secret
spawn wget https://gosspublic.alicdn.com/ossutil/1.7.10/ossutil64 -O ossutil64
interact
spawn chmod 755 ossutil64
interact
spawn ./ossutil64 config
expect {
"*commands):" {send "\r";exp_continue}
"*executed):" {send "\r";exp_continue}
"*endpoint:" {send "$DEFAUTENDPOINT\r";exp_continue}
"*accessKeyID:" {send "$ACCESSKEYID\r";exp_continue}
"*accessKeySecret:" {send "$ACCESSKEYSECRET\r";exp_continue}
"*stsToken:" {send "\r";exp_continue}
}
linux运维之expect--安装ossutil64
最新推荐文章于 2023-12-28 16:15:20 发布