[PLUG] Translating ^M to \n

Rich Shepard rshepard at appl-ecosys.com
Mon Aug 12 23:38:08 UTC 2019


On Mon, 12 Aug 2019, Rodney W. Grimes wrote:

> Are you sure it is not ^J^M, your probably only seeing the ^M in emacs,
> this is known as CR LF line termination.

Rodney,

Yep.

> Many ways to fix it..
> dos2unix is a common utility...

Did this; emacs still shows ^M but the status line indicates UNIX \n.

> tr -d '\15' < winfile.txt > unixfile.txt

This makes one huge line.

> perl, awk, ftp localhost in ascii mode *may* fix it.

Perhaps perl; not awk as the crlf is not a field.

Rich



More information about the PLUG mailing list