我从 bash 开始,发现以下内容:
if test $first -lt $second
then
echo $first is lower than $second
else
if test $first -gt $second
then
echo $first is higher than $second
else
echo $first and $second are equals
fi
fi
Run Code Online (Sandbox Code Playgroud)
为了阅读脚本并执行它,我知道它的作用,但不知道 -lt 和 -gt 的用途。
有人可以告诉我这种“工具”的名称是什么以及它们(-lt 和 -gt)是做什么的?谢谢!