[SATLUG] Odd behavior with sed and $

Don Davis dondavis at reglue.org
Wed Feb 24 20:14:07 CST 2010


Thank you. sed -e 's/\r//g'
works as well.
I should have suspected carriage return, but I don't remember seeing 
this problem before.


Bruce Dubbs wrote:
> 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