Remove DOS line endings from Text files (CR/LF)
From Tech-Wiki
Revision as of 04:05, 1 August 2016 by Fabricio.Lima (Talk | contribs) (Created page with "Category:Linux dos2unix is a commandline utility that will do this, or :%s/^M//g will if you use Ctrl-v Ctrl-m to input the ^M, or you can :set ff=unix and vim will do it...")
dos2unix is a commandline utility that will do this, or :%s/^M//g will if you use Ctrl-v Ctrl-m to input the ^M, or you can :set ff=unix and vim will do it for you.
Or in vim you can use: :%s/\r/\r/g or:
sed 's/^M$//' windows.txt > unix.txt sed 's/\r$//' windows.txt > unix.txt tr -d '\r' < windows.txt > unix.txt