#aa=xxxx
#zz="cc $aa"
#aa=gggg
#echo $zz
out put is
cc xxxx
if I want to get
cc gggg
how should I do, I don't want to write zz="c $aa " after aa=gggg
Why?
First:
zz="cc $aa"
will not produce:
cc xxxx
because there is a leading space in the output.
Second: It is good that you don't want to use:
zz="c $aa "
because the output you want to get includes a leading space, "cc" instead of "c", and no trailing space. So, what you need is:
zz=" cc $aa"