linux shell编程老是出现错误:./s4: line 20: syntax error: unexpected end of file
源程序如下:#!/bin/basha=$1b=$2if[-z$a]||[-z$b]thenecho"pleaseenter2no"exit1fiif[$a-eq$b];t...
源程序如下:
#!/bin/bash
a=$1
b=$2
if [ -z $a ] || [ -z $b ]
then
echo"please enter 2 no"
exit 1
fi
if [ $a -eq $b ];
then
echo"number a = number b"
else if [ $a -gt $b ]
then
echo"number a > number b"
else if [ $a -lt $b ]
then
echo"number a < number b"
fi
fi 展开
#!/bin/bash
a=$1
b=$2
if [ -z $a ] || [ -z $b ]
then
echo"please enter 2 no"
exit 1
fi
if [ $a -eq $b ];
then
echo"number a = number b"
else if [ $a -gt $b ]
then
echo"number a > number b"
else if [ $a -lt $b ]
then
echo"number a < number b"
fi
fi 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询