I'm puzzled by this behaviour of cat when trying to output a heredoc containing JSON in bash 3.2:input:$ cat <(cat <<EOF> {x:[{a:1,b:2}]}> EOF)output:{x:[a:1]}{x:[b:2]}What's going on?
Why does `cat` seem to iterate over JSON arrays?
bash;cat;fifo;here document;json
This is just shell variable expansion by bash.  In this context whatever is between the curly braces will be iterated and expanded into the expression.$ echo var{1,2,3,4}var1 var2 var3 var4$ echo var{1..10}var1 var2 var3 var4 var5 var6 var7 var8 var9 var10