bash check whether a parameter is empty code example
Example: bash if empty params
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