I was going to point out head if nobody else had. Having "grown up" on Windows systems, it took me a while to figure out how many useful tools a UNIX system provides. You don't always need the Perl Swiss Army Knife if the right size screwdriver is just lying around already.
To check for empty lines (as the original post suggests), you can count them using grep: