Rudi Cilibrasi writes:
>Suppose I have a 100-byte file called "myfile.dat", and I want to get
>rid of the last 10 bytes.
#include <stdio.h>
main () {
int i;
for (i=0; i < 90 ; i++) {
(void) putchar(getchar());
}
}
It has worked for me in the past.
Use the program with shell i/o redirection, as in
program < myfile.dat > truncated.dat
Brian