For example, the file looks like this:
{
"a":1
}
{
"b":2
}
I want turn it into :
{"a":1}
{"b":2}
How can I do that in bash ?
For example, the file looks like this:
{
"a":1
}
{
"b":2
}
I want turn it into :
{"a":1}
{"b":2}
How can I do that in bash ?
Trivial with jq
:
$ jq -c . input.json
{"a":1}
{"b":2}
The -c
option stands for compact output, with each value on a single line.