Check for empty variables
If you want to check for a empty bash variable you can do this like given here:
# if VAR is empty
if
[
"x
$VAR
"
==
"x"
]
;
then
...
fi
When $VAR is empty the Statement in the if-clause is true