标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
简述 Linux 文件系统的目录结构 | 783 | 0 | 0 | 2009-03-23 | |
Linux Shell脚本编写基础 | 1230 | 0 | 0 | 2009-03-23 | |
mysql数据库简单备份 | 322 | 0 | 0 | 2009-03-23 | |
linux系统文件夹 | 1237 | 0 | 0 | 2009-03-23 | |
linux 常用命令(三)--对外通信 | 408 | 0 | 0 | 2009-03-23 | |
linux 常用命令(二)--查看用户信息 | 519 | 0 | 0 | 2009-03-23 | |
Router os 安装 | 1142 | 0 | 0 | 2009-03-23 | |
linux 常用命令(一)--查看时间/日历 | 735 | 0 | 0 | 2009-03-23 | |
linux基础知识 | 1037 | 0 | 0 | 2009-03-23 | |
linux 常用命令(四)--ls | 485 | 0 | 0 | 2009-03-23 | |
Linux 常用命令 | 335 | 0 | 0 | 2009-03-23 | |
Linux系统信息查看命令大全 | 295 | 0 | 0 | 2009-03-23 | |
Linux操作系统的安装(PXE引导安装、网络安装、分区选择) | 1652 | 0 | 0 | 2009-03-23 | |
sync详解 | 1408 | 0 | 0 | 2009-03-23 | |
Linux文件的归档和备份 | 575 | 0 | 0 | 2009-03-23 | |
Linux磁盘配额 | 871 | 0 | 0 | 2009-03-23 | |
文件权限说明(Linux) | 1836 | 0 | 0 | 2009-03-23 | |
VMware虚拟机及VMtool安装 | 792 | 0 | 0 | 2009-03-23 | |
Linux 常用命令 | 400 | 0 | 0 | 2009-03-23 | |
磁盘阵列(raid5)搭建 | 1187 | 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语句,可要是不能这样
我要实现程序跳转(也就是查了以个分数等级后,不退出程序还能继续查询第二个)
该用什么方法实现。
小弟在此先行叩谢了。