I have a json file (1m+ rows)
[{...},
{...},
{...},
{...}]
I want to remove the square brackets at start and end and also each commas at end of line. I came across a sed command that will add it but I want to do the opposite?
sed '1s/^/[/;$!s/$/,/;$s/$/]/' file
Ideally, it will take in an input file and output it to a new file...
expected output:
{...}
{...}
{...}
{...}
Any ideas?