ubuntu:file:dos2unix
This is an old revision of the document!
Ubuntu - File - DOS2UNIX
Convert all DOS newlines (CR/LF) to UNIX format (CR). This is the same as converting /r/n to /n.
Works when each line ends with ^M (Ctrl-M). Removes the ^M.
awk '{sub(/\r$/,"");print}' filename
ubuntu/file/dos2unix.1574889197.txt.gz ยท Last modified: 2020/07/15 09:30 (external edit)