|
My guess is that the last record in your file does not contain a newline character after it.
For example, if you type echo -n "hi" > someFile and then try wc -l someFile it'll show the file as having 0 lines, since the -n option doesn't put a newline character at the end of the line.
And when you vi your file, you should see something like "yourFile" [Incomplete last line] ... at the bottom of the screen. You could fix this by running a command like echo >> yourFile.
|