When I open a file with vim -b it displays ^K sometimes in the text, which cannot be removed by dos2unix. It prevents dos2unix from processing the file:

dos2unix: Binary symbol 0x0B found at line 628

How can I remove them automatically (script or macro)?

  • That's a vertical tab. Of course dos2unix won't do anything about it, dos2unix only translates CR/LF to LF, it doesn't remove other control characters from the file. – mosvy Apr 30 at 8:49
  • But when it found it, it gnores the file: os2unix: Binary symbol 0x0B found at line 628 – Benjamin Apr 30 at 8:52
  • perl -pe 's/\r\n/\n/' -i your_files – mosvy Apr 30 at 8:56
  • 2
    dos2unix -f your_files – mosvy Apr 30 at 8:57
  • Thanks for the -f. I'll try it – Benjamin Apr 30 at 11:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.