| 标题 | 阅读 | 评论 | 转发 | 发布日期 | |
|---|---|---|---|---|---|
| 与Ubuntu一道成功——关注Ubuntu 2006中国之行 | 674 | 0 | 0 | 2009-03-23 | |
| Linux下的快捷键和简单命令 | 1041 | 0 | 0 | 2009-03-23 | |
| iptables由概念到应用 | 968 | 0 | 0 | 2009-03-23 | |
| Oracle数据库开发(二) Linux下配置使用ProC | 1870 | 0 | 0 | 2009-03-23 | |
| linux 里面装windows | 995 | 0 | 0 | 2009-03-23 | |
| Linux系统启动脚本分析之rc | 976 | 0 | 0 | 2009-03-23 | |
| Linux启动脚本分析之functions | 1113 | 0 | 1 | 2009-03-23 | |
| Linux系统开机过程详细分析 | 726 | 0 | 0 | 2009-03-23 | |
| Linux下Eclipse+Myeclipse安装 | 879 | 0 | 0 | 2009-03-23 | |
| Linux操作系统下利用SSH进行远程控制 | 1047 | 0 | 0 | 2009-03-23 | |
| Linux学习笔记 文件服务Vsftp详细介绍 | 639 | 0 | 0 | 2009-03-23 | |
| vim编辑器终结版 | 731 | 0 | 0 | 2009-03-23 | |
| FC3服务器配置一条龙 | 612 | 0 | 0 | 2009-03-23 | |
| linux-用户的个人网站 | 1284 | 0 | 0 | 2009-03-23 | |
| 某Linux服务器被变成肉鸡的过程 | 1156 | 0 | 0 | 2009-03-23 | |
| Linux禁Ping的方法 | 1403 | 0 | 0 | 2009-03-23 | |
| samba | 984 | 0 | 0 | 2009-03-23 | |
| linux的认证考试 | 1435 | 0 | 0 | 2009-03-23 | |
| 利用/proc/loadavg监控CPU的平均负载 [cpu负载测试] [php] | 2551 | 0 | 0 | 2009-03-23 | |
| 实现Linux与windows的文件互传 | 941 | 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语句,可要是不能这样
我要实现程序跳转(也就是查了以个分数等级后,不退出程序还能继续查询第二个)
该用什么方法实现。
小弟在此先行叩谢了。