Home » Infrastructure » Linux » spliting a xml file based on no.of records in linux
spliting a xml file based on no.of records in linux [message #580694] Tue, 26 March 2013 22:46 Go to next message
supriya_546
Messages: 56
Registered: October 2005
Location: hyderabad
Member
Hi,

I have a file which has huge GB's of data. I need to split the file based on no.of records and load the same.input file is an XML file.

my file content is like

----------------
<rec> data1 fhdkjhgk kjfkdgkd kjdfgkdf
gfjfdh jgkhkjfdhg hfdkgdf kjhgkfdgk gkjfdkhkfd </rec>
<rec> gnkjfdgfd khj jghdjhg kgjhdkjfhg kjdfhgkjfd </rec>
<rec> ndgbjfd gjfdhjgd ghfdkj </rec>
---------------------

here if i want to split the file for 100000 rec's, then i need to find 100000 record in the file, cut the same data and move into another file.

I need help to write this code in linux.

Thanks for the help.

- Supriya


Re: spliting a xml file based on no.of records in linux [message #580696 is a reply to message #580694] Tue, 26 March 2013 23:31 Go to previous messageGo to next message
BlackSwan
Messages: 23070
Registered: January 2009
Senior Member
Problem & solution have NOTHING to do with Oracle DB (or Linux actually)

It can be done in PERL in under 20 lines of code.
Re: spliting a xml file based on no.of records in linux [message #580704 is a reply to message #580694] Wed, 27 March 2013 01:58 Go to previous message
Michel Cadot
Messages: 59821
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This question bears no real connection with Oracle database.
Please find a more appropriate forum.
The topic is locked. ./fa/448/0/
If I'm wrong, please, PM me (or report this message to a moderator, explain why you think it should be unlocked and it might be done).

Regards
Michel
Previous Topic: SAN i/o in RAC
Next Topic: Manual DB creation error
Goto Forum:
  


Current Time: Fri Nov 28 18:09:57 CST 2014

Total time taken to generate the page: 0.12423 seconds