Answers for "shell script -z"

0

shell script -z

# -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
Posted by: Guest on September-03-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language