$ a='"apple","ball","cat"'
$ a='['$a
$ echo $a
["apple","ball","cat"
$ a=$a']'
$ echo $a
b
I'm stumped hard by the result b while I expect to see ["apple,"ball","cat"]. What am I missing here?
This is from bash shell on Mac. Also see it on CentOS 7, while not on Fedora. Can someone please explain?
set -xv? – choroba Nov 14 '17 at 22:28b
– user3866672 Nov 14 '17 at 22:37GNU bash, version 4.3.48, I get the expected["apple","ball","cat"]. – dessert Nov 14 '17 at 23:21