check if a variable is null in shell script 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