Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash "-z" flag

# -z flag returns true if NULL or uninitialized variable

if [ -z "$NULLVAR" ]; then
	echo "Not initialized"
else
	echo "Exists"
fi
# Not initialized
 
PREVIOUS NEXT
Tagged: #bash #flag
ADD COMMENT
Topic
Name
3+5 =