Question

I am facing hard time in removing the special characters from the csv file. I have done a head -1 so i am trying to compare only 1 row. wc filename shows it has 1396 byte count If i go to the end of the file the curson ends at 1394. In vi I do set list (to check for control characters), i see a $ (nothing after that), so i now know its the 1395 byte count. Can someone please tell me where is the 1396th byte? I am trying to compare 2 files using diff and its giving me a lot of trouble. Please help.

Was it helpful?

Solution

The last 2 bytes of your line are \r\n - this is a Windows line ending. dos2unix converts this into a Unix line ending, which is \n - hence the line is shortened by 1 byte following conversion.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top