📜  shell script -z - Shell-Bash 代码示例

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

代码示例1
# -z string
# True if the length of string is zero.

MY_VAR="${1}"

if [ -z $MY_VAR ] ; then
  echo "No input provided for script"
  exit 1
fi