• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need a script to handle big files

 
M Burke
Ranch Hand
Posts: 406
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a file that has 2 million rows (Database import). Its part of a batch process and is refreshed once a month. I would like to break it up into 100K row chunks. Anyone know of a script that does this? Thanks
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

will generate files called PREFIXaa, PREFIXab, PREFIXac ... of 100000 lines each.
 
Jay Suttiruttana
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Continue from Stefan post.

The "split" is a tool available in UNIX and Linux OS environment. If you're in MS Windows environment, there is a GUI tool called JR Split File (http://www.spadixbd.com/freetools/index.htm).
 
M Burke
Ranch Hand
Posts: 406
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cool, thanks guys
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic