摘要: 使用expect可以省去手动交互的过程,比如scp的密码曾遇到这样一段代码:(Bash脚本)#!/usr/bin/expect -fset HOST "192.168.102.1"set USER "codefor"set PASS "codefor"set BOOKFILE "/home/codefor"#uploadspawn "scp *.zip $USER@$HOST:$BOOKFILE"expect { "*password*" {send "$PASS\ 阅读全文
posted @ 2011-07-21 10:43 Codefor 阅读(3523) 评论(0) 推荐(0) 编辑