Covers how to distinguish between an unset variable and a variable explicitly set to an empty string in Bash/POSIX shell scripts. Two approaches are presented: a POSIX-compliant method using parameter expansion (`${var+x}`) that works even with `set -o nounset`, and a Bash 4.2+ built-in check using the `-v` flag. Both
Sort: