From https://unix.stackexchange.com/a/32227/674
The main places where it's safe not to use the double quotes are:
- in an assignment:
foo=$bar(but note that you do need the double quotes inexport "foo=$bar"or in array assignments likearray=("$a" "$b"));
Why isDoes it mean that it is not required to double quote
$barin assignmentfoo=$bar? Why?Why do we need the double quotes in
export "foo=$bar"and in array assignments likearray=("$a" "$b")?
Thanks.