bash check if env variable is not empty 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