#!/usr/bin/expect spawn ssh remotehost expect "*some key word*" send "kinit -f " expect "*assword*" send "password " send "cmd1 " send "cmd2 " send "df -h " send "hostname " send "date " interact
. /cfg
读取cfg文件中设置的环境变量,别名
#!/usr/bin/expect spawn ssh remotehost expect "*some key word*" send "kinit -f " expect "*assword*" send "password " send "cmd1 " send "cmd2 " send "df -h " send "hostname " send "date " interact
. /cfg
读取cfg文件中设置的环境变量,别名