Help with csv format needed
Hi folks,
I have a contact list like this: David davidcorra@gmail.com Sam samy@hotmail.com Lisa lisa@abc.com You could see there is a empty line between each record. Howc an I use bash or any script to turn it to the following commar or tab separated csv format: David,davidcorra@gmail.com Sam,samy@hotmail.com Lisa,lisa@abc.com |
Hi.
You can use awk: Code:
$ awk 'BEGIN {RS=""; FS="\n"} {print $1","$2}' contacts.txt |
Thanks a lot. It works great.
|
All times are GMT -5. The time now is 10:11 PM. |