[PLUG] Translating ^M to \n

Rich Shepard rshepard at appl-ecosys.com
Mon Aug 12 21:28:09 UTC 2019


I have large (~111M) .csv data files exported from a Microsoft Access
database. Each file is one large block of text using ^M (carriage return)
embedded as the line separator.

'sed' is probably the best tool to translate that control character to a
newline (\n) but I don't know how to write '^M' so sed recognizes it as a
single character. In emacs it displays colored cyan rather than white.

A web search told me that ^M is equivalent to the linux \r, but not how to
specify it for sed or emacs.

Pointers needed.

Rich



More information about the PLUG mailing list