[PLUG] Translating ^M to \n [RESOLVED]
Rich Shepard
rshepard at appl-ecosys.com
Mon Aug 12 22:00:58 UTC 2019
On Mon, 12 Aug 2019, Jason Barbier wrote:
> 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
Thanks, Jason. I ran both files through dos2unix to no effect.
What did work was,
cat <filename> | tr "^M" "\n"
When I reverted the buffer in emacs the huge block of text was separated
into rows.
Regards,
Rich
More information about the PLUG
mailing list