Forgive me if this is a trivial question, I don't have much experience with this.
I have a file that looks like this:
{text},
{text},
{text},
{text},
I want it to look like this
[{text},
{text},
{text},
{text}]
Note that the final comma is removed, and that there are now square brackets at the beginning and end of the file.
So, I have thousands of files in a directory, and each file has to be fixed to do that.
I'm guessing I have to use sed somehow but I don't really know how to make it happen and don't want to do it manually using VIM since there are so many files...
EDIT:
I tried to use:
sed -i '1s/^/\[/;$s/,$/\]/' *
as suggested by codeforester. I get an error saying "Argument list too long"...