# -z flag returns true if NULL or uninitialized variable if [ -z "$NULLVAR" ]; then echo "Not initialized" else echo "Exists" fi # Not initialized