bash check if null
expanding on the previous 'bash not null' post to check if a string is null
String='' # Zero-length ("null") string variable.
if [ -z "$String" ]
then
echo "\$String is null."
else
echo "\$String is NOT null."
fi # $String is null.