“-z”在 shell 脚本中究竟做了什么?

What does “-z” does exactly in a shell script?

我有这个脚本,我知道第一行和 if 块中发生了什么,但无法理解 if 条件。

pid5=$(ps aux | grep -w "consumer-1.0.jar general" | grep -v grep | awk '{print }')

        if [ -z "$pid5" ]; then
            kill -9 "$pid5" 
        fi

我也在 google 和 SO 上搜索过,但找不到任何帮助。

查看 man 页面,上面写着:

`-z String'

 True if the length of String is zero.