Archive for August, 2007
Get rid of (remove) ^M in files using perl
Sunday, August 5th, 2007To remove completely
perl -pi -e ‘tr/\cM//d;’ foo.php
To replace for spaces:
perl -pi -e ‘tr/\cM/\n/d;’ foo.php
foo.php is an example file.
To remove completely
perl -pi -e ‘tr/\cM//d;’ foo.php
To replace for spaces:
perl -pi -e ‘tr/\cM/\n/d;’ foo.php
foo.php is an example file.