title: How to send text from stdin to a script
body: <p>Other than doing:</p>
  <pre><code>$ ./script &lt; myfile.txt
  </code></pre>
  <p>Is there a way to pass text directly in the command-line, for example something like:</p>
  <pre><code>./script &lt; &quot;hello this is not a test&quot;
  </code></pre>
  <p>The program I have which I want to send text to is:</p>
  <pre><code>// script.c
   #include&lt;stdio.h&gt;
   int main(void)
   {
       char c;
       while ((c = getchar()) != EOF)
           putchar(c);
   }
  </code></pre>