I am trying to remove junk characters from file using sed command. I tried by using below command but not worked. sed -i 's/[^[cntrl]]/ /g' sed -i 's/[^[print]]/ /g'
Asked
Active
Viewed 36 times
0
-
2Does this answer your question? [Trying to remove non-printable charaters(junk values) from a UNIX file](https://stackoverflow.com/questions/34412754/trying-to-remove-non-printable-charatersjunk-values-from-a-unix-file) – costaparas Jan 05 '21 at 12:23
-
Does the accepted answer [here](https://stackoverflow.com/questions/34412754/trying-to-remove-non-printable-charatersjunk-values-from-a-unix-file) suffice for your purposes? It uses the complement of `[:print:]` with either `sed` or `tr`. – costaparas Jan 05 '21 at 12:24
-
I have try with [:print:], but it is not replacing non printable characters like <97> – Learner Jan 05 '21 at 12:48