/*+JMJ * cat - print stdin to stdout * Copyright 2011 David Meyer */ #include int main() { char buffer[7]; while (fscanf(stdin, "%6s", buffer) == 1) /* while (fgets(buffer, 10, stdin) != NULL) while (fscanf(stdin, "%s", buffer) == 1) */ { /* fputs(buffer, stdout); printf("/%d/%s/%s/\n", (int) buffer[9], buffer, buf2); */ printf("/%s/%d/", buffer, (int) buffer[6]); } return 0; }