Strip all non-printable ASCII characters
sh



Challenge 1, 24 23 chars

tr -dc \ -~&lt;a.txt&gt;b.txt


Bonus: variations on the set of characters to delete.

tr -dc " -~
"&lt;a.txt&gt;b.txt                       # preserves printables + line feed




tr -dc "[:space:] -~"&lt;a.txt&gt;b.txt   # preserves printables + whitespace