[H-GEN] Splitting up a text file
Adil, Kim - Brisbane (Maintenance)
AdilK at transfield.com.au
Mon Aug 21 01:46:53 EDT 2000
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Please observe the list's charter. ]
The form of the text file is like:
"5.16 Non completion of specified works
The Contractor shall aim to complete all specified works by the required
completion date.
The Contractor should be aware that its personnel are required to perform
all work prior to the agreed required completion date otherwise .....
Second paragraph, blah ,blah , blah
(i) first dot point
(ii) second one
5.16 next paragraph
The Contractor shall aim to complete all specified works by the required
completion date.
The Contractor should be aware that its personnel are required to perform
all work prior to the agreed required completion date otherwise .....
Second paragraph, blah ,blah , blah. This time no dot points."
I had a look at the split function in perl, but again it appears to be
concerned with splitting a line rather than somehow being able to keep
paragraphs together that can be imported into a database.
Regards,
Kim Adil
> -----Original Message-----
> From: Andrae Muys [SMTP:a.muys at mailbox.uq.edu.au]
> Sent: Monday, 21 August 2000 15:26
> To: 'general at lists.humbug.org.au'
> Subject: Re: [H-GEN] Splitting up a text file
>
> [ Humbug *General* list - semi-serious discussions about Humbug and ]
> [ Unix-related topics. Please observe the list's charter. ]
>
> On Mon, 21 Aug 2000, Adil, Kim - Brisbane (Maintenance) wrote:
>
> > I have a contract in a large text file and I would like to split each of
> the
> > clauses up and insert them into a postgresql database in a text field
> (not
> > limited by number of characters). I believe that we can use the new line
> and
> > the leading clause number to mark where the file should be split. Any
> ideas,
> > maybe a perl script with regexp?
> >
> Yes it is possible. However before you can get a more specific answer you
> will have to provide a more complete description of the input format, and
> how you want the output formatted. ie. as a requirements specification,
> the above description is inadequate.
>
> Andrae
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> =
> Andrae Muys <andrae at humbug.org.au> "Never ascribe to malice that which is
> Shortech International Ltd adequately explained by incompetence."
> -Napoleon Bonaparte
>
>
> --
> * This is list (humbug) general handled by majordomo at lists.humbug.org.au .
> * Postings to this list are only accepted from subscribed addresses of
> * lists 'general' or 'general-post'.
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.
More information about the General
mailing list