Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

980.Text file splitter -- How to split a text file to different files according to first word in each line?

User: Max -- 2012-07-24          << 979  981 >>
Hits: 1719
Type: Text file splitter   
Search all Text file splitter examples
Description:
How to split a text file to different files according to first word in each line
Input Sample:
sca_01
cgatcgtactgagt
gatcgtaggct
gatcgtacgt
sca_02
cgatcgtacgtgagt
gatcgtgact
gatcgtagct
sca_03
cgatcgtgactgagt
gatcggatact
gatcgtaact
Output Sample:
sca_01.txt
sca_01
cgatcgtactgagt
gatcgtaggct
gatcgtacgt

sca_02.txt
sca_02
cgatcgtacgtgagt
gatcgtgact
gatcgtagct

sca_03.txt
sca_03
cgatcgtgactgagt
gatcggatact
gatcgtaact
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open text file
2. open menu "File->Save As->Split by paragraph"
* set "split naming" to:

* set "para start" to "other": 
* set "para end" to "none"
3. click "next", and select a output filename in the target folder, such as a.txt
4. click "save", and your file will be splitted to:
sca_01.txt, sca_02.txt, ...

Similar Examples:
How to split a text file to different files according to first word in each line? (100%)
How to split a text file according to first word in each line? (86%)
How to split a file into many files according to first letter of each line? (81%)
How to process text files, only keep the first word of each line? (66%)
How to batch split file delimitered by first dash in each line? (65%)
How to split a file into two parts according to the content of line? (63%)
How to limit a text file to less than 40 chars each line? (63%)
How to sort a text file by the length of text in each line? (62%)

Check Demo of Text file splitter
Keywords:
split a text file to different files according to first word in each line  firstline  split naming  split by paragraph  naming  non  splitter  text file splitter  paragraph  next  split text file according to word  split each line and save as filename  split according to first  text file splitter split by first  split text files by word  file splitter paragraph  text paragraph splitter  paragraph splitter