[PLUG] Translating ^M to \n
Jason Barbier
jason at corrupted.io
Mon Aug 12 21:31:17 UTC 2019
https://emacs.stackexchange.com/questions/5779/how-to-convert-dos-windows-newline-characters-to-unix-format-within-gnu-emacs
that covers it with emacs
and if sed or tr is your speed
https://stackoverflow.com/questions/2613800/how-to-convert-dos-windows-newline-crlf-to-unix-newline-lf-in-a-bash-script
---
Jason Barbier | E: jason at corrupted.io
GPG: FD7D2D5F0A0FBE39 (https://keybase.io/kusuriya)
On Mon, Aug 12, 2019, at 2:28 PM, Rich Shepard wrote:
> 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
> _______________________________________________
> PLUG mailing list
> PLUG at pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
More information about the PLUG
mailing list