HI all,
I wrote this code but it doesn't catch any of the two variables being null, why?
echo "$var1 - $var2"
if [ "$var1" == ""] || [ "$var2" == ""]
then
echo "Incomplete data"
exit 1
fi
The initial echo prints nothing for the variables when I run my script so the if statement should work right? But it doesn't for some reason.