I have a variable containing comma-separated list, and I need to use it for brace expansion"
foo=aa,bb,cc
echo $foo
echo /tmp/{$foo}
but that just prints literally /tmp/{aa,bb,cc}
.
Whereas, when I do it without variable, it works:
echo /tmp/{xx,yy,zz}
/tmp/xx /tmp/yy /tmp/zz
why does the firs case not work?