Need to add two commas to the end of each line in a text file

Commissario
Joined
16 Oct 2002
Posts
343,477
Location
In the radio shack
I have a text file which contains around 80,000 rows

I need to add two commas to the end of each row.

I thought I could do it in Numbers but it won't handle that many rows.

Does anyone have any suggestions as to how I can do this?
 
open terminal
locate the file and then type vim [filename.txt]
then enter:
Code:
:%s/$/\,,/g
press esc

if it adds ,, to the bottom move the cursor over that and type
Code:
dd
then type
Code:
:wq

Try it on a backup of the file first ;)
 
Back
Top Bottom