mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
added a note on the importance of quoting for this application.
@@ -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.
|
Reference in New Issue
Block a user