The key point is how the thing is parsed.
When you do this:
Code:
var=value with spaces
What your shell really understands is this:
Code:
var=value command parameters
This syntax is often used when running commands in linux, for example, a common use is to launch X programs on an alternate display:
Code:
DISPLAY=:0.1 gvim ~/.conkyrc
When you put the thing into a variable, the shell only sees a single token, and only after that it's expanded. So, the following would put the whole string into $DISPLAY but would not work as intended from the command line:
Code:
$ var=":0.1 gvim ~/.conkyrc"
$ DISPLAY=$var
# This obviously will not launch the command
# But instead set the var with the given value
$ echo $DISPLAY
:0.1 gvim ~/.conkyrc