csv file in excel and saved it as .txt and when I count the lines using wc -l
there is one line less in the .txt format 17768 vs 17769.
- Is this normal? and if so which line is lost in the conversion?
- What is the easiest way to make this conversion in bash?
Thanks!
Hello again. You could check the output of
head
andtail
on both files, and that should reveal the discrepancy.Kevin
I did all lines match in both files
You could try the
diff
command. The discrepancy is likely related to encoding and end-line characters, e.g., Windows carriage returns (\r
) versus end-line characters on Linux (\n
)head
/tail
would have freaked out on one of the files if the line endings had been different between them.The initial assumption with
head
andtail
was that there may have been a blank line at the beginning or end of one of the files. We cannot see the user's actions from where we are sitting.