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