rafaelmaeuer
5/18/2017 - 2:56 PM

Bash Shell: Find Out If a Variable Is Empty Or Not - From https://www.cyberciti.biz/faq/unix-linux-bash-script-check-if-variable-is-empty/

Bash Shell: Find Out If a Variable Is Empty Or Not - From https://www.cyberciti.biz/faq/unix-linux-bash-script-check-if-variable-is-empty/

if [ -z "$var" ]
then
      echo "\$var is empty"
else
      echo "\$var is NOT empty"
fi