急,斑竹请指点一下(在线等)
我用的是RH7.2版本的LINUX
用VI简单写了一个脚本程序可是总出错,程序如下
#!/bin/sh
echo "Is it morning? please answer yes or no"
read ANSWER
if [ $ANSWER -eq "yes" ]
then
echo "goodmorning"
else
echo "goodafternoon"
fi
exit 0
出入结果是
Is it morning? please answer yes or no
yes
if.sh: [: yes: integer expression expected
goodafternoon
这段脚本错误在哪啊?