I have two programs (Prog1.c and Prog2.c) written in C and each of them take one command line argument. 
Prog1.c takes a file name as argument , reads content from file and outputs it on the STDOUT (standard output) screen. Prog2.c takes data as argument and does some operation. I want to redirect output of Prog1.c to Prog2.c as input.
I have tried following bash script which gives me error
#!/bin/bash
prog2 "`prog1 file.txt`"  
I have also tried without quotes and in both cases, it gives me following error.
Prog2:: argument list too long.
 
     
     
     
    