Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

shell cehck if string is null

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/
 
PREVIOUS NEXT
Tagged: #shell #cehck #string #null
ADD COMMENT
Topic
Name
9+7 =