I want to remove all control characters "^ A" from the file using SED. I can remove all control characters using 'sed s / [[: cntrl:]] // g', but how can I specifically specify "^ A"?
to play "^ A" just press Ctrl-v Ctrl-a, this will play ^ A in the file
sed -i -e 's/^A/BLAH/g' testfile
the ^A on this line is the result of pressing Ctrl-v Ctrl-a
^A
^ A is byte 1 or \x01 so you can do this:
\x01
sed 's/\x01//g'
Keep in mind that for single-byte changes, "tr" is faster than sed, although you will have to use the bash $'..' syntax to give it 0x01 bytes:
$'..'
tr -d $'\x01'