Remove carriage returns in a text file

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed Feb 21 13:49:46 UTC 2007


On Tue, Feb 20, 2007 at 11:45:33PM -0500, S. Krishnan wrote:
> Pipe it through tr(1) invoked as something like tr -d '\015', which will
> delete the CRs.  If you want to convert the carriage returns to line
> feeds you can try tr '\015' '\012'.

Unless you have old mac text files, I doubt you will need the CR -> LF
conversion. :)

--
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list