shell if check null or false variable 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