#!/usr/bin/env sh #!/usr/bin/expect git add . git commit -m "file"
set timeout 1
expect -c " spawn git push -u origin master # 执行交互式命令 expect \"Username for 'https://gitee.com':\" # 当匹配到此条内容 send \"188********\r\" # 则执行此条内容 expect \"Password for 'https://*********@gitee.com':\" send \"********.\r\" interact"
|