-z 选项在 shell 脚本中的 if 条件中 [英] -z option inside if condition in shell script

查看:80
本文介绍了-z 选项在 shell 脚本中的 if 条件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以在使用 shell 脚本编写 if 条件时告诉我 -z 选项的重要性吗.

Can someone post me the significance of -z option while writing if condition using shell scripts.

让我粘贴我正在查看的确切条件

Let me paste the exact condition what I am looking at

if [[ "x$do_clean_flag" = "x-clean" && -z "$show_me_flag" && "$verify" = true ]]

推荐答案

来自帮助测试":

-z STRING      True if string is empty.

这篇关于-z 选项在 shell 脚本中的 if 条件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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