Shell 脚本:-z 在 shell 脚本中是什么意思?

Shell Scripting: What does -z mean in shell scripting?

我有一个代码可以做这样的事情:

if [ -z "$SOME_VARIABLE" ]; then
    echo "something something 1"
else
    echo "something something 2"
fi

我不知道“-z”在这里做什么。有人可以解释一下吗?

[ 是一个与其他任何命令一样的命令,只是名称不寻常。您可以查看 [ 手册页以了解其标志的含义。

$ man [

<snip>

       -n STRING
              the length of STRING is nonzero

       STRING equivalent to -n STRING

       -z STRING
              the length of STRING is zero

-z string: True if string is empty.

http://linuxcommand.org/wss0090.php