Quantcast
Channel: Question and Answer » json
Viewing all articles
Browse latest Browse all 148

Why does `cat` seem to iterate over JSON arrays?

$
0
0

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?


Viewing all articles
Browse latest Browse all 148

Trending Articles