这是什么意思-z Bash中? [英] What does -z mean in Bash?

查看:95
本文介绍了这是什么意思-z Bash中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在看下面的code:

I'm looking at the following code:

if [ -z $2 ]; then
        echo "usage: ...

(3点是不相关的使用细节。)结果
也许我Google上搜寻它错了,但我无法找到用于 -z 选项的说明。

推荐答案

-z字符串 True如果字符串为空(空字符串)

-z string True if the string is null (an empty string)

这篇关于这是什么意思-z Bash中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆