Why do [[ -z ]] and [[ -v ]] have different syntax? – unix.stackexchange.com

If I want to perform some commands given variables aren't set I'm using: if [[ -z "$a" || -z "$v" ]] then echo "a or b are not set" fi Yet the same syntax doesn't work with -v, I have to use: if ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "Why do [[ -z ]] and [[ -v ]] have different syntax? – unix.stackexchange.com"