bash pull certain lines from a file
You can try a combination of tail and head to get the correct lines.
head -n 125000 file_name | tail -n 25001 | grep "^$i "
Don't forget perl either.
perl -ne 'print if $. >= 100000 && $. <= 125000' file_name | grep "^$i "
or some faster perl:
perl -ne 'print if $. >= 100000; exit() if $. >= 100000 && $. <= 125000' | grep "^$i "
Also, instead of a for loop you might want to look into using GNU parallel.