📜  bash 不等于 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:27.096000             🧑  作者: Mango

代码示例3
# In bash, you should do your check in arithmetic context:

if (( a > b )); then
    ...
fi

# For POSIX shells that don't support (()), you can use -lt and -gt.

if [ "$a" -gt "$b" ]; then
    ...
fi