Parse irregular data, dump into delimited text file
d_at_rren.cymraeg.org
Date: 11/27/05
- Next message: Ed Morton: "Re: Parse irregular data, dump into delimited text file"
- Previous message: Michael Heiming: "Re: ksh under Cygwin"
- Next in thread: Ed Morton: "Re: Parse irregular data, dump into delimited text file"
- Reply: Ed Morton: "Re: Parse irregular data, dump into delimited text file"
- Reply: Bill Marcum: "Re: Parse irregular data, dump into delimited text file"
- Reply: William James: "Re: Parse irregular data, dump into delimited text file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 27 Nov 2005 18:10:59 GMT
I've been given an MS Word document containing information to input into
a database. I've knocked it into shape using various unix tools eg.
sed, cut etc. so now I have data in a plain text file like this :
name|address|postcode|telephone
The address field contains data in an irregular form, eg.
12, the high street, town, place, biggerplace
The vicarage, town place
I need to be able to format address field above ready for importing
into another database. In this new database, I have 3 fields for
address (address1, address2, address3).
So my problem is how to cut this address data and then put it back in a
text file with delimiter. address3 should contain only one word,
however, address1 and address2 may contain more than one word. When
filling in the fields, data should be added from left to right, or in
the order address1 then address2 then address3. If there is an address
field left with a blank, that is not a problem as it will be handled by
the mailmerge software.
Help on this much appreciated.
Darren
-- Aberdare Blog http://blog.aberdare.org/ Only Blog In The Valley
- Next message: Ed Morton: "Re: Parse irregular data, dump into delimited text file"
- Previous message: Michael Heiming: "Re: ksh under Cygwin"
- Next in thread: Ed Morton: "Re: Parse irregular data, dump into delimited text file"
- Reply: Ed Morton: "Re: Parse irregular data, dump into delimited text file"
- Reply: Bill Marcum: "Re: Parse irregular data, dump into delimited text file"
- Reply: William James: "Re: Parse irregular data, dump into delimited text file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|