Home > News, Unix > Clean up CTRL-M ( ^M ) chars

Clean up CTRL-M ( ^M ) chars

September 15th, 2007 Leave a comment Go to comments
using VI while the file is open :  :%s/^M$//g
using sed :   cat file | |sed 's/^M$//' > newfile
using dos2unix :  http://www.linuxcommand.org/man_pages/dos2unix1.html
using tr :   tr -d "\015" < filename > newfile
  1. No comments yet.
  1. No trackbacks yet.