| 标题 | 阅读 | 评论 | 转发 | 发布日期 | |
|---|---|---|---|---|---|
| redhat linux密码修改方法 | 1171 | 0 | 0 | 2009-03-23 | |
| 利用vsftpd进行文件的传输 | 853 | 0 | 0 | 2009-03-23 | |
| popen用法 | 1963 | 0 | 0 | 2009-03-23 | |
| 主机动手系列 — 怎么管理Suse Linux | 754 | 0 | 0 | 2009-03-23 | |
| Shell演义之前世今生篇 | 1011 | 0 | 0 | 2009-03-23 | |
| Linux虚拟机上网攻略 | 1312 | 0 | 0 | 2009-03-23 | |
| iostat使用 | 820 | 0 | 0 | 2009-03-23 | |
| linux的filesystem repaier | 907 | 0 | 0 | 2009-03-23 | |
| linux shell 中"2>&1"含义 | 1070 | 0 | 0 | 2009-03-23 | |
| Linux/Unix命令之Ethtool | 654 | 0 | 0 | 2009-03-23 | |
| linux 三种退出系统方法 | 1399 | 0 | 0 | 2009-03-23 | |
| 修改ssh默认端口号 | 1261 | 0 | 0 | 2009-03-23 | |
| 简述 Linux 文件系统的目录结构 | 832 | 0 | 0 | 2009-03-23 | |
| Linux Shell脚本编写基础 | 1259 | 0 | 0 | 2009-03-23 | |
| mysql数据库简单备份 | 334 | 0 | 0 | 2009-03-23 | |
| linux系统文件夹 | 1267 | 0 | 0 | 2009-03-23 | |
| linux 常用命令(三)--对外通信 | 422 | 0 | 0 | 2009-03-23 | |
| linux 常用命令(二)--查看用户信息 | 555 | 0 | 0 | 2009-03-23 | |
| Router os 安装 | 1172 | 0 | 0 | 2009-03-23 | |
| linux 常用命令(一)--查看时间/日历 | 771 | 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语句,可要是不能这样
我要实现程序跳转(也就是查了以个分数等级后,不退出程序还能继续查询第二个)
该用什么方法实现。
小弟在此先行叩谢了。