'Cannot Get rid of all of ^C , ^A, in a file

Hi: I have a file with

  • ^A^M (they seem to go together)
  • ^C
  • ^M

In vi, I used

:%s/\r//g

to get rid of most of the annoying characters but

^C and ^A remains.


It's a wierd.

dos2unix did not work.


I used

perl -pi -e 's/[\cA-\cZ]*//g'

but all the spaced between the lines have been removed

If anyone knows of a good trick, please let me know. Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source