I have a large json table and I need to add comm between json objects on it. I can not do this manually. The file structure looks like:
[{"host"
}
{"host"
}
{"host"
}
]
I need to modify it using sed
to be like:
[{"host"
},
{"host"
},
{"host"
}
]
I executed the following command. I did not get any error. But nothing changed in the file:
sed -i 's/}{"host"/},{"host"/g' result.json
I suspect that I should consider that }{ are separated by new line? I tried to add \n
in the command but also did not work.