added a note on the importance of quoting for this application.

Michael Sobrepera
2022-02-19 19:00:48 -08:00
parent 0ce7b481b9
commit 943b6071f7

@@ -36,3 +36,4 @@ This is a stylistic issue that does not affect correctness. If you prefer the or
* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc! * Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!
* [Bash reference manual for -z and -n](https://www.gnu.org/software/bash/manual/html_node/Bash-Conditional-Expressions.html#Bash-Conditional-Expressions). * [Bash reference manual for -z and -n](https://www.gnu.org/software/bash/manual/html_node/Bash-Conditional-Expressions.html#Bash-Conditional-Expressions).
* Note: Be careful with quoting variables (which you should always do anyway): `[ ! -z $var ]` might work, but `[ -n $var]` will not. `[ -n "$var" ]` will do what you expect.