you are viewing a single comment's thread
view the rest of the comments
[–] 10 points 2 years ago*

Why -z? I have no idea.

From man test (note that [ <expr> ] is just sugar for test <expr>):

       -n STRING
              the length of STRING is nonzero

       -z STRING
              the length of STRING is zero

So, -z stands for Zero.

Hope this helps you remember it!

  • source
  • parent