cygwin 下 最简单的bash shell 都出错 ,怎么回事?
RT
例如:
#!/bin/bash
if [ $1 -gt 90 ]
then
echo "Good, $1"
elif [ $1 -gt 70 ]
then
echo "OK, $1"
else
echo "Bad, $1"
fi
出现错误:line 5:syntax error near unexpected token 'elif'
再例如:
#!/bin/bash
x=1999
let "x = $x + 1"
echo $x
x="olympic'"$x
echo $x
输出:
") intax error : invalid arithmetic operatior < error token is "
1999
olympic'1999