Results 1 to 3 of 3
hello all,
I tried for 10 hours to find a solution to this problem but I have to ask for help. I have a script that extracts some information from ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-11-2012 #1Just Joined!
- Join Date
- Oct 2012
- Posts
- 2
How to convert a text file in a csv file
hello all,
I tried for 10 hours to find a solution to this problem but I have to ask for help. I have a script that extracts some information from an email. this is the output
output.txt
username = sevenofnine
firstname = Annika
lastname = Hansen
comments = borg
password = 0000
I need to convert this file to a csv file like this
sevenofnine,Annika,Hansen,borg,0000
- 10-11-2012 #2Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,199
Hi.
Suppose your (originally posted) data is on file data1. Then:
produces:Code:cut -f3 -d" " data1 | paste -d, -s
Best wishes ... cheers, drlCode:someusername,somename,somelastname,somecomments,somepassword
Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
- 10-11-2012 #3Just Joined!
- Join Date
- Oct 2012
- Posts
- 2
I can not believe it! you're the best!


Reply With Quote
