📌  相关文章
📜  如果字符串为空,则 shell cehck - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:08.498000             🧑  作者: Mango

代码示例1
my_var="nixCraft"
if [ -z "$my_var" ]
then
      echo "\$my_var is NULL"
else
      echo "\$my_var is NOT NULL"
fi

// https://www.cyberciti.biz/faq/bash-shell-find-out-if-a-variable-has-null-value-or-not/