sh check empty parameter 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