Is there a non-eval way to expand braces in the string of a bash variable? -
normally, if shell input given expansion (e.g. curly braces), bash expand it:
$ a=a{b,c,d}e $ echo $a abe ace ade
however, if string quoted such expansion doesn't happen, or received variable populated, braces become part of variable string:
$ a="a{b,c,d}e" $ echo $a a{b,c,d}e
how expand it? if have var value a{b,c,d}e
, there native bash way other eval echo $a
?
Comments
Post a Comment