in reply to to divide/split a file to small files.
Yet another approach would be to simply fire off grep command(s), each one directing its output to a different file. If you felt particularly brave, you could even fire 24 copies of that command to run in parallel with one another. (They would not smash each other nearly as much as you might suppose, since the OS would undoubtedly realize that “the same file” is open for reading by, say, 24 different processes.)
To my way of thinking, the trade-off is between “the efficiency of the computer’s job-description when it runs this,” vs. “how much time do you want to spend to ‘get ’er done?’ ” The nice thing is, any ol’ computer these days will more-or-less shrug its shoulders indifferently at what you see to be a “large” file. So, you have several reasonable alternatives.
Be nice to me, for you can be replaced by a very small shell script.