I have this kind of file:
{...}
{...}
{...}
{...}
And I want it to look like this:
{...},
{...},
{...},
{...},
How can I do this with Linux/Unix tools? Thanks
I have this kind of file:
{...}
{...}
{...}
{...}
And I want it to look like this:
{...},
{...},
{...},
{...},
How can I do this with Linux/Unix tools? Thanks
Transferring my comment to an answer.
You can use:
sed 's/$/,/' file
Or for inline editing of the file:
sed -i '' 's/$/,/' file
$ will match end-of-line in each line.