Input to the program would be start and end position of the unique
word in each line from db and a text file.
For example: for the below input file start position is 0 and end position is 6 which is ABCDEF,store this value and compare with the first 6 characters in second line ifs its same copy them into same file else copy them into another file.For every file there can be 'n' no unique words ,n different files need to be created dynamically.positions will change file to file.The file size can be more than 10gb
Original input file: originalfile.txt ABCDEF aksjlnf woeirf 234 1234
FJHIJK sdfdf 3412344 124
ABCDEF asdhgbfl 3 agagd
FJHIJK agagafg 1 agag
output should be:splitfile1.txt
ABCDEF aksjlnf woeirf 234 1234
ABCDEF asdhgbfl 3 agagd
splitfile2.txt FJHIJK sdfdf 3412344 124
FJHIJK sdfdf 3412344 124