Hard to tell what the "best" solution is if there´s given no further criteria how best is defined. It might be
cat file.txt | nl | grep "the"
if the goal is to invest least programmer hours.
As the comments already pointed out the bottleneck will be the time required for disc access. The file size of 30k lines should still be less than 10 MB so just read it in to one memory chunk to avoid additional disc reads. Then do some profiling on a single threaded search to check if it is worth the effort to make use of parallelization, as this also comes with some overhead for thread spawning and coordination and higher code maintenance costs.