嗨,我有这句话,我想知道这是什么意思。
if [[ -z "$1" ]]; then # --> this is if the value of the parameter $1 is zero
PASO=1
elif [[ "$1" -gt 1 ]] ; then # but i don't know what this flags mean? .."-gt"
LOG "[$(date +%T)] Parametros incorrectos"
exit 255
else
PASO=$1
fi
什么-gt
意思
$ help test
test: test [expr]
Evaluate conditional expression.
...
arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,
-lt, -le, -gt, or -ge.
Arithmetic binary operators return true if ARG1 is equal, not-equal,
less-than, less-than-or-equal, greater-than, or greater-than-or-equal
than ARG2.
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句