Corion may be onto something here regarding line-endings. If you want to check your file's line-endings specifically, you can use the following one-liner. It'll print out in hex the line ending for every line in the file, preceeded by the line number. Redirect it to a file if the list is too long for your console.
perl -wMstrict -nE 'say "$. ".unpack("H*",$1) if /([\n\x{0B}\f\r\x{85}
+]{1,2})/' file
Output:
1 0a
2 0a
3 0a
4 0a
5 0a
6 0a
That's a Unix style ending, (\n). For a Windows ending, you'd see 0d0a for \r\n, and for Mac (or possibly a broken Windows ending), 0d for \r.
If your endings aren't all the same, you can try running dos2unix at the command line, or in a vi/vim editor: :set ff=unix, then :wq. |