if [ 1 -ne 1 ];then
...
fi
这是指当1不等于1时执行then后的语句

-eq:等于
-ne:不等于
-le:小于等于
-ge:大于等于
-lt:小于
-gt:大于

相关文章: