If that's really what you want to do, and, again, it's odd, and you want to automate it, I'd say a better way would be to write a program to do it. If you don't feel up to that, a fairly unoptimized one-liner might be:

Code:
dd if=file of=newfile bs=1 count=`expr \`wc -c file | awk '{print $1}'\` - 1`


Ugh. Ugly. But it works.
_________________________
Bitt Faulk