标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
在Linux里设置环境变量PATH的方法 | 1286 | 0 | 0 | 2009-06-07 | |
Linux中文件查找方法大全 | 680 | 0 | 0 | 2009-06-07 | |
红旗 Linux Desktop5.0 安装Firefox2.0时报错 | 1162 | 0 | 0 | 2009-06-06 | |
Linux资源下载地址 | 817 | 0 | 0 | 2009-06-06 | |
初学linux之--MPlayer | 742 | 0 | 0 | 2009-06-06 | |
初学linux之--装eva qq | 1006 | 0 | 0 | 2009-06-05 | |
初学linux之-装GTK+-2.0 | 1146 | 0 | 0 | 2009-06-05 | |
LINUX网络服务 NIS服务 | 1345 | 0 | 0 | 2009-06-05 | |
linux如何查看系统信息 | 892 | 0 | 0 | 2009-06-04 | |
如何判断linux系统是否要添加内存 | 1199 | 0 | 0 | 2009-06-04 | |
sed 学习笔记 | 819 | 0 | 1 | 2009-06-04 | |
linux 下加挂硬盘的具体做法 | 915 | 0 | 0 | 2009-06-03 | |
Linux 安装*src.rpm的时候出现错误 | 4252 | 0 | 0 | 2009-06-03 | |
linux学习笔记1 | 866 | 0 | 0 | 2009-06-02 | |
Linux系统下正确配置DHCP服务器 | 1161 | 0 | 0 | 2009-06-02 | |
linux 发展史 | 1140 | 0 | 0 | 2009-06-02 | |
Linux 读写 NTFS | 884 | 0 | 0 | 2009-06-01 | |
Ubuntu8.10下播放rmvb文件 | 785 | 0 | 0 | 2009-06-01 | |
yum 的用法 Linux | 721 | 0 | 0 | 2009-06-01 |
朋友你好!
我刚开始搞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语句,可要是不能这样
我要实现程序跳转(也就是查了以个分数等级后,不退出程序还能继续查询第二个)
该用什么方法实现。
小弟在此先行叩谢了。