标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
《开源Linux》杂志下载地址! | 818 | 0 | 0 | 2009-03-23 | |
Linux下安装、配置ACE | 1139 | 0 | 0 | 2009-03-23 | |
partprobe 小命令大作用 | 1291 | 0 | 0 | 2009-03-23 | |
linux的tty | 1687 | 0 | 0 | 2009-03-23 | |
字符界面安装Red Hat Enterprise 4 | 1533 | 0 | 0 | 2009-03-23 | |
linux简述和安装部署 | 998 | 0 | 0 | 2009-03-23 | |
linux上mysql安装 | 1657 | 0 | 0 | 2009-03-23 | |
迷茫 | 1385 | 0 | 0 | 2009-03-23 | |
samba服务器的设置 | 1591 | 0 | 0 | 2009-03-23 | |
Linux简单的DHCP服务器配置 | 1250 | 0 | 0 | 2009-03-23 | |
lvm及磁盘配额 | 1132 | 0 | 0 | 2009-03-23 | |
LINUX的课堂随笔:linux的概述及安装 | 1411 | 0 | 0 | 2009-03-23 | |
Linux 系统安全规范 | 1232 | 0 | 0 | 2009-03-23 | |
Linux 内核新 logo | 1538 | 0 | 0 | 2009-03-23 | |
Linux简单的Samba服务器配置 | 1647 | 0 | 0 | 2009-03-23 | |
通过xmanager远程连接redhat linux as 5 | 2633 | 0 | 0 | 2009-03-23 | |
初步操作linux | 907 | 0 | 0 | 2009-03-23 | |
linux下为php添加GD库(重新编译php) | 1179 | 0 | 0 | 2009-03-23 | |
Microsoft: No Office Software for Linux | 1297 | 0 | 0 | 2009-03-23 | |
配置磁盘阵列 | 1069 | 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语句,可要是不能这样
我要实现程序跳转(也就是查了以个分数等级后,不退出程序还能继续查询第二个)
该用什么方法实现。
小弟在此先行叩谢了。