Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
 
PREVIOUS NEXT
Tagged: #shell #script
ADD COMMENT
Topic
Name
6+3 =