check for null variable bash code example
Example: check if a variable is null in bash
if [[ -n "$list_Data" ]]
then
echo "not Empty"
else
echo "empty"
fi
if [[ -n "$list_Data" ]]
then
echo "not Empty"
else
echo "empty"
fi