大家好,我有一个问题想请教大家: 我设计一个脚本,脚本有多个模块,脚本在每个模块执行完后就询问用户是否继续,如果用户输入y或Y或20min后还什么也没有输入,则程序继续运行下一模块,如此直至所有模块全部执行完成.如果用户输入n或N则程序退出,否则,程序发出报错信息. 注:我对本问题的困惑是:用户20min之内什么也没有输入,程序就继续运行,这怎么实现?请教各位大侠.
这个简单脚步: #!/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 ...
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...
想从控制台读入输入赋给变量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 ..........
如果我用这样的格式 while read line do . . . done < filename filename里面的文件格式是这样的 abd 12334 abd 1234 ddf 1234 类似的字符之间的空格个数是不一定的,可以让$line包涵多个空格的么?用read只有一个空格剩下了
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...