标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
CentOS 4.2 手工安装 | 1161 | 0 | 0 | 2009-03-23 | |
SUSE笔记:gnupg安装 | 1124 | 0 | 0 | 2009-03-23 | |
Dynamips: Wandering的Dynagen实验拓朴(.net文件) | 1551 | 0 | 0 | 2009-03-23 | |
SUSE笔记:eject的使用 | 979 | 0 | 0 | 2009-03-23 | |
SUSE笔记:安装GTK+ | 1226 | 0 | 0 | 2009-03-23 | |
SUSE笔记:安装firefox和thunderbird | 1230 | 0 | 0 | 2009-03-23 | |
Linux:nohup | 1017 | 0 | 0 | 2009-03-23 | |
CentOS笔记:安装后第一次重启,出现grub loading stage2 ... | 2312 | 0 | 0 | 2009-03-23 | |
CentOS笔记:如何保证安装后默认使用图形界面,并且支持中文 | 845 | 0 | 0 | 2009-03-23 | |
CentOS笔记:配置系统启动时默认的启动模式(字符、图形) | 928 | 0 | 0 | 2009-03-23 | |
CentOS笔记:gnupg命令行使用说明 | 997 | 0 | 0 | 2009-03-23 | |
CentOS笔记:VirtualBox使用说明之Shared Folders | 1247 | 0 | 0 | 2009-03-23 | |
CentOS笔记:AdobeReader使用时报错(expr: syntax error) | 1938 | 0 | 0 | 2009-03-23 | |
利用 iptables 构建 linux 防火墙 | 801 | 0 | 0 | 2009-03-23 | |
VirtualBox: uninstall 1.6.4 and install 2.0.2 | 933 | 0 | 0 | 2009-03-23 | |
OpenSUSE: MPlayer / SMPlayer | 768 | 0 | 0 | 2009-03-23 | |
RHEL 5.2 kenel 2.6.18 iptable 添加模块 | 1122 | 0 | 0 | 2009-03-23 | |
Linux 解压文件(更新中) | 768 | 0 | 0 | 2009-03-23 | |
如何恢复LINUX的引导(两种方法) | 459 | 0 | 0 | 2009-03-23 | |
rpm安装总结 | 779 | 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语句,可要是不能这样
我要实现程序跳转(也就是查了以个分数等级后,不退出程序还能继续查询第二个)
该用什么方法实现。
小弟在此先行叩谢了。