I run 64-bit Windows 8.1 Pro with Git Bash installed. I have a
703 MB text file. In it, there's
18,949 integers, each on its own line. All of the integers are of varying lengths - the largest one is
83,639 digits long! Here's what I need to be able to do:
For each of the lines in the text file, check if the integer has at least one perfect divisor between
If a perfect divisor is found, stop checking for another and skip to the next integer on the next line.
If a perfect divisor is not found, take that integer and save it to a new text file.
Do the same for the next lines.
I have some background in Java but it would seem the task I outlined cannot be accomplished with the language, seeing as how the lines are of varying lengths. See one of the answers from here. I figured it might be possible in Bash or something of the sort. After all, it is a Turin-complete language.