I've tried to find this problem in past threads, so sorry if this is a repost.
I have a large file with regular data. The file is too large for me to open it all at once, so I need to split it into evenly (preferred) spaced output files with some regular name.
So if my full file is called 'bigfile.txt' I want to output:
subfile_1.txt, subfile_2.txt etc... where each subfile has a user-determined number of lines (say 100k). Also, if this program gets to the end of bigfile, what do you recommend I do so that it doesn't error, since the last subfile probably won't be exactly 100k lines?