Wednesday 15 July 2015

Line ending issue DOS > Linux > Java -


I'm having trouble with 160,000 lines of files, this file was generated through an xlsx file exported in There is a .txt extension but I am afraid that it has been exported as a DOS-like file, at the end of each line it has a dos line break, I am using a parser written in Java, running on the Ubuntu environment I have been, and when I run a parser (I Because I can not use source code of part of a jar), I get number format expexation, hope for a number, my line ends in such a way:

  4449   

but the parser sees it as

  Input String: "4449 & amp; #xd;" & Lt;   

Do you have the solution? Again, I can not reach the parser myself, I have to edit the file on my "Ubuntu Machine" and end the line.

Try using the dos2unix command on that file it's line terminator Should fix

  & gt;   



No comments:

Post a Comment