ChinaUnix.net
相关文章推荐:

sh read e 读入用户输入的信息

有一个安装程序file1,运行时会出许多问题提示需用户输入的,部分代码如下: note() { local temp read temp ans=$temp } note "Please input the path to install:" aaa=$temp note "Please input the username:" bbb=$temp note "Please input .... :" cc...

by 风中的风信子 - Shell - 2004-11-05 14:16:14 阅读(1889) 回复(7)

相关讨论

大家好,我有一个问题想请教大家: 我设计一个脚本,脚本有多个模块,脚本在每个模块执行完后就询问用户是否继续,如果用户输入y或Y或20min后还什么也没有输入,则程序继续运行下一模块,如此直至所有模块全部执行完成.如果用户输入n或N则程序退出,否则,程序发出报错信息. 注:我对本问题的困惑是:用户20min之内什么也没有输入,程序就继续运行,这怎么实现?请教各位大侠.

by hfvbc - Shell - 2011-12-20 15:25:29 阅读(11833) 回复(26)

这个简单脚步: #!/bin/bash # used to find and delete core file # fdcore dir find $1 -name core |cat |while read line do if [ -f $line ] then echo -n "$line will be deleted! Are you sure?" read line2 case $line2 in y|Y) rm -f $line;; n|N) echo "$line will be hold there!";; *) echo "You enter one wrong anwser! --y|n" read line2 ...

by tech11 - Shell - 2006-11-08 15:40:02 阅读(1313) 回复(4)

一般情况下read是从标准输入中读,或者是命令行,或者是重定向! read可以读管道么? 比如echo 'a' | read b 这个字符a会存到变量b中么? 谢谢!

by POLOGG - Shell - 2005-12-08 14:07:06 阅读(1115) 回复(5)

执行read a之后等待用户输入,将输入的内容作为a的值,现在我想自动为a赋值而不需要用户输入,除了 read a < file之外有没其它方法呢? 谢谢!

by lzcxh - Shell - 2008-03-17 16:13:04 阅读(1776) 回复(7)

EMC(sh/bj)招聘信息sh: 1)sw manager(1 opening):c/c++ development background ; 3 yrs+ software management experience; 5 yrs+ software development experience; Report to US CTO; Be femilar with SAN knowledge; prefer :java/html/javascript/storage technologies; total package is about 500k/year 2)sr. sw engineer 4yrs+ c/c++ development experience (bachelor); 2yrs+ c/c++ dev...

by smyxthz - 猎头招聘 - 2007-06-10 13:42:00 阅读(1184) 回复(2)

想从控制台读入输入赋给变量IP,但执行后提示 can't read "ip": no such variable,哪位大拿能指点一下? ............ send "ip= 'read' \r" spawn ssh -l root 10.142.4.$ip expect "*password:" send "pswd\r" expect "Last*" interact ..........

by panwei789 - Shell - 2007-09-13 10:44:33 阅读(1943) 回复(3)

如果我用这样的格式 while read line do . . . done < filename filename里面的文件格式是这样的 abd 12334 abd 1234 ddf 1234 类似的字符之间的空格个数是不一定的,可以让$line包涵多个空格的么?用read只有一个空格剩下了

by tong1125 - Shell - 2005-04-19 00:56:27 阅读(1058) 回复(1)

EMC(sh/bj)招聘信息sh: 1)sw manager(1 opening):c/c++ development background ; 3 yrs+ software management experience; 5 yrs+ software development experience; Report to US CTO; Be femilar with SAN knowledge; prefer :java/html/javascript/storage technologies; total package is about 500k/year 2)sr. sw engineer 4yrs+ c/c++ development experience (bachelor); 2yrs+ c/c++ dev...

EMC磁盘阵列

by smyxthz - 存储备份 - 2007-06-08 09:27:00 阅读(1481) 回复(3)

想查找某个本机用户(非网络)有没有登录,不知怎么写。

by 蹦蹦跳鱼 - Shell - 2003-04-02 23:33:08 阅读(934) 回复(5)

真变态! 竟然把 _ 作为域分隔符 怎么样去掉呢?

by welcome008 - Shell - 2009-03-11 23:21:07 阅读(1644) 回复(11)