Back

text splitter

#1
So um, anyone know how to split a text file by lines? Like a 122,000 line .txt file into 10 files without breaking the lines. I tried something called Simple Text Splitter but that doesn't work for UTF-8 and for Unicode it changes kanji/kana to question marks; textSplitter has a naming scheme that I can't figure out.
Reply
#2
This is one of those things that's trivial in Unix because there's been a standard utility for the job provided with the OS for the last 30 years:
Code:
split -l 12200 input.txt outprefix
So that's the way to go for Linux and MacOS.
Reply
#3
Thanks but I just 'facepalmed' and realized that now that I've got a good PC and now that I figured out how to take a certain txt and flip the strings around per line, I could use a certain tool and all is well. Yeah that's not vague at all, because I used the word 'certain'. That being the case, I shall soon have something good to share for neurotic cloud-fearing people like myself.

Edit: Hmm actually maybe not. Didn't realize the size...

Edit 2: n/m That certain tool doesn't work. Back to the drawing board.
Edited: 2010-12-13, 3:24 am
Reply
May 16 - 30 : Pretty Big Deal: Save 31% on all Premium Subscriptions! - Sign up here
JapanesePod101
#4
You can do this using the Swiss File Knife. Use the split command.
Reply
#5
Blahah Wrote:You can do this using the Swiss File Knife. Use the split command.
Program won't run for me.
Reply
#6
nest0r Wrote:
Blahah Wrote:You can do this using the Swiss File Knife. Use the split command.
Program won't run for me.
from the command line?
Reply
#7
Blahah Wrote:
nest0r Wrote:
Blahah Wrote:You can do this using the Swiss File Knife. Use the split command.
Program won't run for me.
from the command line?
From your (insert living healthy relative here)'s house.

Actually I got things working via a different route, re: the large .txt, so I guess it's all taken care of.
Edited: 2010-12-13, 4:51 am
Reply