Replace DOS line feeds (CRLF line terminators) using sed
Wednesday, March 20th, 2013A sed command stumbled on the fact that a text file came from Windows. file filename.csv gave ASCII text, with CRLF line terminators To fix it: sed -i ‘s/^M//’ filename.csv Where the “^M” is input by pressing Ctrl-V then ENTER. Credits.