praise12:
Not guaranteeing this because if you're binary data over writes you EOL, octal \012, you may have a problem reading the data. Here's a small example:
1) Given data file, file.1, which looks like this:
aABCd
tr -dc '\012\101\102\103' < file.1 > new.file
this example says to delete all characters, but
LF - octal \012
A - octal \101
B - octal \102
C - octal \103
new.file should look like:
ABC
lower case a and d were deleted.
Do a man ascii and you'll see a listing of the ascii character set in octal. expand the command I've given you to choose the values you want. You'll probably want to go to \177.
If this doesn't do it, you'll probably have to write a "C" program. Use the low-level open function.
Regards,
Ed
Schaefer