linux - How to convert Windows end of line in Unix end of line (CR/LF to LF) -
i'm java developer , i'm using ubuntu develop. project created in windows eclipse , it's using cp1252 encoding.
to convert utf-8 i've used recode program:
find web -iname \*.java | xargs recode cp1252...utf-8
this command gives error:
recode: web/src/br/cits/projeto/geral/presentation/gravacaomessagehelper.java failed: ambiguous output in step `cr-lf..data
i've serached , solution here: http://fvue.nl/wiki/bash_and_windows#recode:_ambiguous_output_in_step_.60data..cr-lf.27 , says:
convert line endings cr/lf single lf: edit file vim , give command :set ff=unix , save file. recode should run without errors.
nice i've many files remove cr/lf character, can't open each it. vi doesn't provide option command line bash operations.
sed can use ? how ?
thankx =)
there should program called dos2unix
fix line endings you. if it's not on linux box, should available via package manager.
Comments
Post a Comment