Add line at the end

How to add a comma at the end of each line in this file?

30    1412 
30    3352 
30    5254 
30    5543 
30    7478 
3    28 
3    30 
3    39 
3    54 
3    108 
3    152 
3    178 
3    182 
3    214 
3    271 
3    286 
3    300 
3    348 
3    349 
3    371 
3    567 
3    581 
3    584 
3    586 
3    590 
3    604 
3    611 
3    8283 

Try:

sed 's/$/,/' file
1 Like
awk '{$0=$0","}1' file
awk '{print $0","}' file