by stantona · 10y ago · 0 comments
In this case
[ -n $var ]
is the same as test -n $var
$var is not quoted, so when this command is run, word splitting occurs and therefore $var is null. Which there falls into the one argument rule above.Therefore, always quote your variables.
No comments yet.