A couple sample to strip unreadable characters from a binary file
Code:
# Translate junk characters into newlines while squeezing
C:\Temp>tr -sc '[\011\012\015\040-\176]' \n < blob_of_data.txt
# Translate and discard single character lines
C:\Temp>tr -sc '[\011\012\015\040-\176]' \n < blob_of_data.txt | awk "length($0) > 1"
# replace a bad character in a file
0xa0 is a 'non breaking space' that appears often when...