Remove carriage return in Unix

后端 未结 21 2276
傲寒
傲寒 2020-11-22 03:40

What is the simplest way to remove all the carriage returns \\r from a file in Unix?

21条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 04:04

    If you are running an X environment and have a proper editor (visual studio code), then I would follow the reccomendation:

    Visual Studio Code: How to show line endings

    Just go to the bottom right corner of your screen, visual studio code will show you both the file encoding and the end of line convention followed by the file, an just with a simple click you can switch that around.

    Just use visual code as your replacement for notepad++ on a linux environment and you are set to go.

提交回复
热议问题