in reply to Replace filename with pipe in program argument?

This might help. It is simple C program I wrote a while back that takes in STDIN, and prints it to STDOUT.
#include <stdio.h> #include <stdlib.h> #define RETBUFF 512 int main(int argc, char** argv) { char* input[RETBUFF]; while (fscanf(stdin,"%s",&input) != EOF) { printf("%s",&input); fflush(stdout); } return 0; }