📜  bash 如果大于 - Shell-Bash 代码示例

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

代码示例1
# 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