摘要:
标题有点绕口~#!/usr/bin/expect -fif { $argc<4 } { puts stderr "Usage: $argv0 <host> <user> <passwd> <cmd>" exit 1 }set HOST [lindex $argv 0]set USER [lindex $argv 1]set PSWD [lindex $argv 2]set CMDS [lindex $argv 3]log_user 0set timeout 3spawn -noecho ssh $USER@$HOST & 阅读全文