title: How do I read an input file in ruby using < in command line?
body: <p>I want this to work:</p>
  
  <pre><code>./search.sh &lt; inputFile.json
  </code></pre>
  
  <p>and</p>
  
  <pre><code>./search.sh &lt; inputFile2.json
  </code></pre>
  
  <p>That will output something different depending on the file. I would then like to do this:</p>
  
  <pre><code>(./search.sh &lt; inputFile.json) &gt; results.json
  </code></pre>
  
  <p>I'm sure that syntax is wrong. Is anyone able to put me in the right direction? I can't find how to do this in my ruby script (I'm using .sh but it's ruby).</p>