Shell script to break apart file

Here's the simple version of a shell script to break apart the files. With the sample file given, I didn't get any lines for file 8, but haven't had a chance to see if it's me or the file.