Like programming in bash - eviltoast
  • balsoft@lemmy.ml
    link
    fedilink
    arrow-up
    11
    arrow-down
    1
    ·
    edit-2
    1 day 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!