linux bash not empty variable code example
Example: bash if variable is not empty
VAR=`echo Hello world`
if [[ -n "$VAR" ]] ; then echo "Variable is set" ; fi
VAR=`echo Hello world`
if [[ -n "$VAR" ]] ; then echo "Variable is set" ; fi