This will return true if a variable is unset or set to the empty string (“”).
if [ -z "$VAR" ];
Source: scripting – How to determine if a bash variable is empty? – Server Fault
Required fields are marked *
Notify me of new comments via email.
← Bash Scripting Tutorial
Phalcon Router should be done with DI →
Blog at WordPress.com.