On Mon, 12 Aug 2019, Paul Heinlein wrote:

On Mon, 12 Aug 2019, Rich Shepard wrote:

 On Mon, 12 Aug 2019, Paul Heinlein wrote:

  tr -d '\r' < infile.csv > outfile.csv

 Thanks, Paul. I didn't know if tr would recognize ^M as \r so I used
        cat <infile> | tr "^M" "\n" and that changed it to the Mac format,
 rather than the UNIX format, for some reason

My original recipe above merely deletes carriage returns; it leaves newlines intact.

Also, you can use "od -c" to verify the C-style character name tr will recognize.

od -c inffile | less

If you want, you can compare that output with that of "od -a" which will show "nl" for "\n" and cr for "\r".

--
Paul Heinlein
heinl...@madboa.com
45°38' N, 122°6' W
_______________________________________________
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to