Cleaning log files before printing them to the console

If you send non-printable characters to your TTY you might corrupt it, and that’s no fun.

So before you print log files which might contain dodgy data to a console clean it by piping it through tr like this:

tr -c '\11\12\15\40-\176' '?'

Leave a Reply