首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

shell 模拟 按键,该如何解决

2012-11-04 
shell 模拟 按键shell里如何模拟按键,我是在写一个脚本,来安装java等,运行了xxx_java_xxx.bin之后,最后一

shell 模拟 按键
shell里如何模拟按键,我是在写一个脚本,来安装java等,运行了xxx_java_xxx.bin之后,最后一步是按任意键。在shell脚本里如何实现?

Assembly code
#安装Javainstall_java(){    chmod u+x $soft_path"/jdk-6u35-linux-i586.bin"    cp -a $soft_path"/jdk-6u35-linux-i586.bin" /opt     /opt/jdk-6u35-linux-i586.bin        rm -f /opt/jdk-6u35-linux-i586.bin}


这是脚本运行安装完了java的时候:
For more information on what data Registration collects and
how it is managed and used, see:
http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html

Press Enter to continue.....


[解决办法]
用 expect 实现自动交互,我最近也在搞,还有些问题,但是可以实现自动输入的。

[解决办法]
sek

热点排行