Difference between `test -n $a` and `test -n "$a"`

Viewed 82
$ a=""
$ test -n $a
$ echo $?
0
$ test -n a
$ echo $?
0
$ test -n "$a"
$ echo $?
1

What is the difference between them? Why are the results different?

2 Answers
Related