linux expect的使用详解 ? 一、概述 我们通过Shell可以实现简单的控制流功能,如:循环、判断等。但是对于需要交互的场合则必须通过人工来干预,有时候我们可能会需要实现和交互程序如telnet服务器等进行交互...
分类:
其他好文 时间:
2015-10-31 11:38:30
阅读次数:
194
expect安装命令yum-yinstallexpect脚本代码如下:#!/usr/bin/expect
settimeout30
spawnssh-lusername192.168.1.1
expect"password:"
send--"ispass\r"//--可加也可不加
interact脚本文件执行需要使用shell命令:expectfilename来执行命令详细解释1.#!/usr/bin/expect这一..
分类:
系统相关 时间:
2015-08-25 12:29:23
阅读次数:
223