Adding more text to a variable

Is there a more simple way to add text to a variable
I have

var="blue"

and like to add green
to get

echo $var
blue green

Here is how I do it.

var=$(echo "${var} green")

---------- Post updated at 13:23 ---------- Previous update was at 13:12 ----------

:o Uff

Not always easy to see the simple...
This works fine

var="${var} green"

in bash:

$ var+=" green"
$ echo $var
blue green
1 Like

Note that the braces aren't needed either unless what you want to add to the variable could be interpreted by the shell to be part of the variable name.

var=blue
echo "$var"
var="$var green"
echo "$var"
var="${var}red"
echo "$var"

produces

blue
blue green
blue greenred