[H-GEN] Splitting up a text file

Grant, Luke lgrant at seven.com.au
Mon Aug 21 01:16:01 EDT 2000


[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics.  Please observe the list's charter.          ]

the "split" copmmand in perl might be what you are after or perhaps just the
"sed" command.

send an section of the file (or something like it if the data is sensitive)
and i can send you a command to parse it.

Luke

--------------------------------------------
Luke Grant
Systems Administrator
Seven Queensland.
Maroochydore
140-142 Horton Pde.
wk#  +61754301737
mob# +61407317951
-------------------------------------------

> -----Original Message-----
> From: Adil, Kim - Brisbane (Maintenance)
> [mailto:AdilK at transfield.com.au]
> Sent: Sunday, August 20, 2000 10:07 PM
> To: 'general at lists.humbug.org.au'
> Subject: [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.          ]
> 
> Hi,
> 
> 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? 
> 
> A problem that I have with other database packages that I 
> have tried to use
> to import these types of text files into, is that the new 
> line or return is
> imported as a new record and I want to maintain  multiple 
> paragraphs in the
> one record.
> 
> Regards,
> Kim Adil
> 
> 
> --
> * 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