dos to unix CR/LF conversion?
Kevin Cozens
kcozens-qazKcTl6WRFWk0Htik3J/w at public.gmane.org
Sat Nov 8 21:01:10 UTC 2003
At 03:51 PM 11/08/2003 -0500, max wrote:
>you were right. My mac/ie5 converted linefeeds to ^m, instead of \r.
>I can't see straight anymore between '\n', '\r', "^M", "^L", C, perl, tr,
>unix, dos, mac, dog, cat. Arrgh.
The simples way to make the changes you need is via the tr command. Your
starting file has carriage returns (aka, ^M, 0x0D, or \015) instead of line
feeds (aka, ^J, 0x0A, or \012). To make the changes you need, use the tr
command as follows:
tr '\015' '\012' < file-in > file-out
Cheers!
Kevin. (http://www.interlog.com/~kcozens/)
Owner of Elecraft K2 #2172 |"What are we going to do today, Borg?"
E-mail:kcozens at interlog dot com|"Same thing we always do, Pinkutus:
Packet:ve3syb at ve3yra.#con.on.ca.na| Try to assimilate the world!"
#include <disclaimer/favourite> | -Pinkutus & the Borg
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list