In bash, are [[ $variable ]] and [[ -n $variable ]] completely equivalent? It appears to be the case judging by the output below, but I see both forms of usage prevalent in shell scripts.
$ z="abra"
$ [[ $z ]]
$ echo $?
0
$ [[ -n $z ]]
$ echo $?
0
$ z=""
$ [[ $z ]]
$ echo $?
1
$ [[ -n $z ]]
$ echo $?
1
$ unset z
$ [[ $z ]]
$ echo $?
1
$ [[ -n $z ]]
$ echo $?
1
[[ -n $(echo -ne "\0") ]]; echo $?and[ -n $(echo -ne "\0") ]; echo $?differ[ -n ], the same[ -n -n ]. In shells other than zsh, command (even builtin) arguments or shell variables can't contain NUL characters.