Hi.
I ended up with a long script that compared the results of cut, 3 variations of sed, and the binary editor bbe. I did these on Linux and Solaris 10 (but bbe omitted on Solaris). I used cmp as the first test, and then diff for the detailed comparison. On Linux, GNU diff bails out quickly, simply saying that the binary files differ.
The sed variations that I used were:
sed 's/^..//' ...
sed 's/^.\{2\}//' ...
sed 's/^.{2}//' ...
They failed on both Linux and Solaris:
OS, ker|rel, machine: Linux, 2.6.26-2-amd64, x86_64
Distribution : Debian GNU/Linux 5.0
OS, ker|rel, machine: SunOS, 5.10, i86pc
I used the cut output as the standard. The bbe output compared successfully.
Observations:
1) mixed-mode files are not best-practice
2) cut knows about bytes, and appears to use its byte "knowledge" as its character knowledge
3) sed is advertised as:
sed - stream editor for filtering and transforming text
not necessarily collections of arbitrary bytes in mixed-mode files
4) At the center where I worked, we said that we could make processes (almost) as fast as you desired as long as you didn't care about the results. If you get good results in a reasonable time from a particular process, then use it. You may end up wasting more time trying to find the fastest method than if you just let the original process run. This is a kind of case of premature optimization, along with the notion that people time is the most expensive (in most cases).
5) I did not time bbe, but it might be as fast as sed -- it is:
bbe is a sed-like editor for binary files. It performs binary transfor-
mations on the blocks of input stream.
I can post the script and results, however, as I said, they are lengthy. As usual, it is possible that I have incorporated an error of some kind, but in general I agree with the OP ... cheers, drl