shell脚本之用test和eq判断两个数的大小

#!/bin/bash int1=100 int2=200 if test $[num1] -eq $[num2] then echo "num1==num2" else echo "num1!=num2" fi 输出: num1==num2
#!/bin/bash int1=100 int2=200 if test $[num1] -eq $[num2] then echo "num1==num2" else echo "num1!=num2" fi 输出: num1==num2