Register
It is currently Wed Aug 20, 2014 4:23 pm

Formatting text file into csv


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Tue Jul 14, 2009 2:08 pm   

Joined: Tue Jul 14, 2009 1:48 pm
Posts: 1
Hi everyone!"
I'm Valerio, from Italy, i'm new on this forum!

I'm creating a script that takes a webpage full of addresses, strip the tags and create a csv (comma separated values) file.

actually i have this txt file:

Code:
[lot of blank lines]
Cognome:

XXX





Nome:

ZZZZ





Data di nascita:

rrrr





Luogo di nascita:

WWWW





Iscritto all'Albo dal:

EEEE





Cassazionista dal:

WWWWW





Elenco Speciale:







Indirizzo:

WWWW





Località:

WWWW





C.a.p.:

SSSSSS





Telefono:



06.4817080


[lot of blank lines]
Cognome:
XXX





Nome:
ZZZZ





Data di nascita:
rrrr





Luogo di nascita:
WWWW





Iscritto all'Albo dal:
EEEE





Cassazionista dal:
WWWWW





Elenco Speciale:







Indirizzo:
WWWW





Località:
WWWW





C.a.p.:
SSSSSS





Telefono:

06.4817080




and i should end with this:

Code:
COGNOME; NOME; DATA DI NASCITA; LUOGO DI NASCITA; ISCRITTO ALL'ALBO DAL; CASSAZIONISTA DAL; ELENCO SPECIALE; INDIRIZZO; LOCALITÀ; CAP; TELEFONO; e-MAIL;
WWWW; ZZZZ; XXXX; DDDDD;EEEEE; PPPPP; FFFFF; UUUUU; RRRRR; TTTTT; LLLLL; VVVVV;
WWWW; ZZZZ; XXXX; DDDDD;EEEEE; PPPPP; FFFFF; UUUUU; RRRRR; TTTTT; LLLLL; VVVVV;
WWWW; ZZZZ; XXXX; DDDDD;EEEEE; PPPPP; FFFFF; UUUUU; RRRRR; TTTTT; LLLLL; VVVVV;
WWWW; ZZZZ; XXXX; DDDDD;EEEEE; PPPPP; FFFFF; UUUUU; RRRRR; TTTTT; LLLLL; VVVVV;



How can i do? any suggestion?
thx a lot


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP