我尝试使用sample.sh
命令执行文件sh sample.sh
,该命令包含以下代码:
#!/bin/sh
a=10
b=20
if [ $a == $b ]
then
echo "a is equal to b"
else
echo "a is not equal to b"
fi
所以当我尝试执行时,我得到以下错误:
: command not foundine 2:
: command not foundine 5:
sample.sh: line 11: syntax error near unexpected token `fi'
sample.sh: line 11: `fi'
有人可以帮助我吗,我哪里出错了?