expect
07.28.2009 by sunliguo - 0 CommentPosted in Linux, Shell编程
在写一些shell脚本的时候,经常会遇到需要用户输入密码的交互情况。
例如在用rsync备份的时候,如果没有假设rsync服务器端,需要用到ssh+rsync备份,没有提供输入密码的选项。上网上查了一下,有个expct的交互程序。
expect也够复杂的,起码在我看来是这样。先找个可以输入密码的实例:见
http://www.blog.ccidnet.com/blog-htm-do-showone-uid-73559-itemid-238796-type-blog.html Read the rest of this entry