标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
在终端显示中文 | 815 | 0 | 0 | 2009-03-23 | |
ubuntu的系统服务 | 792 | 0 | 0 | 2009-03-23 | |
定制Centos5.2 | 1074 | 0 | 0 | 2009-03-23 | |
一个更换ip的sh | 937 | 0 | 0 | 2009-03-23 | |
vim语法加亮 | 973 | 0 | 0 | 2009-03-23 | |
链接mysql的一个问题 | 936 | 0 | 0 | 2009-03-23 | |
老郑给我的神器--jaws | 693 | 0 | 0 | 2009-03-23 | |
http协议 | 1634 | 0 | 0 | 2009-03-23 | |
升级到ubuntu8.10之后virtualbox因缺少内核模块无法启动的解决办法 | 1760 | 0 | 0 | 2009-03-23 | |
ubuntu ssh非常慢 | 1055 | 0 | 0 | 2009-03-23 | |
nginx启动脚本 | 1686 | 0 | 0 | 2009-03-23 | |
yum不想升级某个软件的时候 | 1201 | 0 | 0 | 2009-03-23 | |
Scrot -- ubuntu/Linux 下一个抓屏截图工具 | 1618 | 0 | 0 | 2009-03-23 | |
度量网络延迟和吞吐量 | 806 | 0 | 0 | 2009-03-23 | |
zshrc | 1155 | 0 | 0 | 2009-03-23 | |
syslogd和logrotate | 951 | 0 | 0 | 2009-03-23 | |
用 complete 补齐sudo命令 | 868 | 0 | 0 | 2009-03-23 | |
Ganglia的安装与配置 | 1608 | 0 | 0 | 2009-03-23 | |
赛MAC的ubuntu设置 | 1445 | 0 | 0 | 2009-03-23 | |
各个系统清dns cache | 2710 | 0 | 0 | 2009-03-23 |
朋友你好!
我刚开始搞linux,碰到了很多问题,想问你下,希望能帮我解答下。
下面是我的一段shell 程序
#!/bin/sh
while [ 0 ]
do
read score
if [ $score -lt 60 ];then
echo " you must work hard!"
elif [ $score -lt 80 ]
echo " just so so,you should do better"
elif [ $score -le 100 ]
echo ”done well ,keep it "
fi
echo " if you want to contiune press y,else press any key to exit"
read C
if [ $c =y ];then
contiune
else
echo "thanks for coming"
fi
done
运行
$ sh -x test.sh
有个错误提示在第二个if出(if 【 $C =y ]) unary operator expected
是什么原因呀?
我以为是一个shell程序里不能同时出现两个if--then--else语句,可要是不能这样
我要实现程序跳转(也就是查了以个分数等级后,不退出程序还能继续查询第二个)
该用什么方法实现。
小弟在此先行叩谢了。