title: Linux passing continuous output as command line args
body: <p>I have a machine vision program (<code>./detectUpdateHomeML</code>) which continuously outputs the name of objects found to the terminal using the following code:</p>
  
  <pre><code>circle( img, center, radius, color, 3, 8, 0 );
  if (circle) {  
    std::cout &lt;&lt; " " &lt;&lt; cascadeName &lt;&lt; " " &lt;&lt; timeFound() &lt;&lt; endl;
    std::cout &lt;&lt; std::flush;
  }
  
  int timeFound() {
    time_t rawtime;
    struct tm * timeinfo;
    char buffer [80];
    time (&amp;rawtime);
    timeinfo = localtime (&amp;rawtime);
    strftime (buffer,80," %Y-%m-%dT%H:%M:%S",timeinfo);
    std:cout &lt;&lt; (buffer);
    eventCount++;
  }
  </code></pre>
  
  <p>I am looking to send this input as command line arguments to a second program using back-ticks to capture the output and send it to the other program like so:</p>
  
  <pre><code>./acceptInput `./detectUpdateHomeML`
  </code></pre>
  
  <p>However the arguments don't seem to be getting passed to <code>./acceptInput</code>.</p>
  
  <p>I have a test program called <code>./testInput</code> that simply prints <code>Hello World!</code> like so:</p>
  
  <pre><code>std::cout &lt;&lt; "Hello World!";
  </code></pre>
  
  <p>When using the same command:</p>
  
  <pre><code>./acceptInput `./testInput`
  </code></pre>
  
  <p>The program works and outputs as expected:</p>
  
  <pre><code>There are 3 arguments:
  0 ./acceptInput
  1 Hello
  2 World!
  </code></pre>
  
  <p>What is going wrong when I try to pass continuous output from <code>./detectUpdateHomeML</code> to the <code>./acceptInput</code> program?</p>