how to check empty string in shell script code example
Example: bash script check empty string
if [ -z "$var" ]
then
echo "\$var is empty"
else
echo "\$var is NOT empty"
fi
if [ -z "$var" ]
then
echo "\$var is empty"
else
echo "\$var is NOT empty"
fi