How can terminal control characters be removed from the file created in linux
I'm createing a file in Linux using command
cat <<EOM! | sudo -u gmepdmpp tee -ai test.log >/dev/null
But the log file is storing all the control character like ^M, ^H, ^K, ^B and other terminal characters.
I tried with dos2unix ( removes only control ^M) and also tried to remove using sed. But I have not able to remove all control and terminal characters
How can these terminal characters be removed from file.
Quick response is highly appreciated