/* make a shell archive out of the files passed as arguments */ #include main(argc, argv) char **argv;{ int i, j; FILE *fo, *fi; if((fo=fopen("shar.out", "w")) == NULL){ printf("can't open file shar.out\n"); exit(1); } fprintf(fo, "#!/bin/sh\n"); while(++argv, --argc>0){ if((fi=fopen(*argv, "r")) == NULL){ printf("can't read file %s\n", *argv); } else{ fprintf(fo, "echo extracting %s ...\ncat >%s <