I have been using
wc -l to check for the number of lines exist in my files. It worked fine always but not this time.
I have 120 big files that are supposed to have at least two lines in each of them. I have just done some text editing work on those files to remove and add new lines. I was trying to check the final number of line by using
wc -l * as usual. The output showed that most of the files had only one line.
I opened up one of the file (which showed from the result of the command that it had only one line) with
vim and I can see that it had exactly 2 lines. Exit
vim and check again using
wc -l, the number of line for that file then appeared as 2.
Does anyone have any idea with what happened over here? And how can I solve this problem instead of opening all 120 files with
PS: The final line of my files weren't empty.