Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We do a lot of queries with binary data in them, and because of that, sometimes when I run "mysqladmin proc", my terminal gets messed up. Running reset fixes it, but I'd prefer to just prevent the problem in the first place. How can I strip these out with sed? Or is there a better way to do it?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You can pipe to cat -v (should show "non-printing" characters in escaped notation)

share|improve this answer
I'd vote you up if I had the rep. Thanks! –  twk Dec 14 '10 at 23:01


sed 's/[^[:print:]]//g' inputfile
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.