bash jika nol atau kosong
if [ -z "$variable" ];
then echo "$variable is null";
else echo "$variable is not null";
fi
No Name Pro
if [ -z "$variable" ];
then echo "$variable is null";
else echo "$variable is not null";
fi
VAR=`echo Hello world`
if [[ -n "$VAR" ]] ; then echo "Variable is set" ; fi
if [[ -z "$VAR" ]] ; then echo "Variable is null" ; fi
if [ -z "$var" ] #return true if $var is unset