editing text files
Nils Kassube
kassube at gmx.net
Tue Nov 8 22:34:14 UTC 2011
Noah wrote:
> okay I am having issues correcting the ^M and line feeds of a text
> file. Let me explain. I transfered a text file that a friend sent
> me from a windows machine. Now when I 'less' the file there are no
> new lines appearing and '^M' appears where I would expect the new
> line to appear.
> What I can do to fix this problem? Is there an option in emacs or is
> there an option from the shell?
I don't speak emacs, so here is a shell command instead:
cat old.txt | tr '\r' '\n' >new.txt
Nils
More information about the ubuntu-users
mailing list