On Sun, Jan 29, 2012 at 1:32 PM, Jesse Molina <address@hidden> wrote:
>
> Can someone cite an example of test -v which works? It is supposed to test
> if a variable has been defined, but I am confused.
>
> Normally I would [[ -z "$THINGY" ]] , but I thought I would give -v a shot.
> I get the feeling I should forget I ever tried.
unset var; [[ -v var ]] || echo false
var=;[[ -v var ]] && echo true
-z test if the expansion is empty which is a bit different from set or unset