избавиться от нуля или пуста
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
variable=${undefined_value:-}
if [ -z "$variable" ];
then echo "$variable is null";
else echo "$variable is not null";
fi