标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
linux 下一条命令查出arp | 407 | 0 | 0 | 2009-03-23 | |
linux根目录下各目录的功能 | 506 | 0 | 0 | 2009-03-23 | |
AS4+Raid | 796 | 0 | 0 | 2009-03-23 | |
浅析linux内核中的idr机制 | 1202 | 0 | 0 | 2009-03-23 | |
可以使用如下方法建立snapshot target的逻辑设备 | 2425 | 0 | 1 | 2009-03-23 | |
TCP-IP原理与基础以及在Linux上的实现 | 719 | 0 | 0 | 2009-03-23 | |
Linux十大高级安全管理技巧 | 660 | 0 | 0 | 2009-03-23 | |
如何让apache支持3gp下载 | 852 | 0 | 0 | 2009-03-23 | |
linux 与其他系统互相共享 | 473 | 0 | 0 | 2009-03-23 | |
linux 下的服务 | 303 | 0 | 0 | 2009-03-23 | |
linux下ftp服务器的搭建 | 4125 | 0 | 0 | 2009-03-23 | |
linux 面试题 带答案 | 1253 | 0 | 0 | 2009-03-23 | |
linux目录结构 | 1752 | 0 | 0 | 2009-03-23 | |
linux 服务自动启动 | 1659 | 0 | 0 | 2009-03-23 | |
ln 命令 | 497 | 0 | 0 | 2009-03-23 | |
linux 共享问题 | 1265 | 0 | 0 | 2009-03-23 | |
/etc/init.d 与/etc/rc.d/init.d 嘛关系 | 1218 | 0 | 0 | 2009-03-23 | |
samba 不能启动了 | 1073 | 0 | 0 | 2009-03-23 | |
secureCRT5.2远程连接 | 1043 | 0 | 0 | 2009-03-23 | |
Linux下整合Apache和Tomcat | 2126 | 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语句,可要是不能这样
我要实现程序跳转(也就是查了以个分数等级后,不退出程序还能继续查询第二个)
该用什么方法实现。
小弟在此先行叩谢了。