当前位置: 技术问答>linux和unix
如何在等待输入的地方传值?
来源: 互联网 发布时间:2017-03-29
本文导语: echo -n "The version you want to install:" read version tar jxvf *$version* cd jpf ./INSTALL 运行到./INSTALL运行安装程序,要求输入IP [sm] Done. [sm] Please input CMS IP: 此处应该怎么处理,可以在./INSTALL后面加什么吗? ...
echo -n "The version you want to install:"
read version
tar jxvf *$version*
cd jpf
./INSTALL
运行到./INSTALL运行安装程序,要求输入IP
[sm] Done.
[sm] Please input CMS IP:
此处应该怎么处理,可以在./INSTALL后面加什么吗?
read version
tar jxvf *$version*
cd jpf
./INSTALL
运行到./INSTALL运行安装程序,要求输入IP
[sm] Done.
[sm] Please input CMS IP:
此处应该怎么处理,可以在./INSTALL后面加什么吗?
|
http://bbs.chinaunix.net/thread-594417-1-1.html
expect基本用法
expect基本用法
|
用expect -c,不过推荐的写法是单独放一个文件。
The -c flag prefaces a command to be executed before any in the script. The command should be quoted to prevent being broken up by the shell. This option may be used multiple times.
Multiple commands may be executed with a single -c by separating them with semicolons. Commands are executed in the order they appear. (When using Expectk, this option is specified as
-command.)