[SATLUG] Odd behavior with sed and $

Bruce Dubbs bruce.dubbs at gmail.com
Wed Feb 24 18:20:19 CST 2010


Don Davis wrote:

> Using cat -v I see ^M at the end of the line. What is ^M in hat 
> notation? (Where do I find this?)

^M is a carriage return as in CR LF.

To get rid of these, I use vim:

vim -b filename

:%s/\r//
:wq

Some distros have a program, dos2unix, that does the same thing.

   -- Bruce





More information about the SATLUG mailing list