title: Need to separate information in a text file using grep or awk or sed
body: <p>I've a text file <strong>fruits.txt</strong> with the information:</p>
  
  <pre><code>15 Apples 0
  155 Bananas 0
  250 Mangoes 0
  555 Oranges 0
  </code></pre>
  
  <p>where the first column with values 15, 155, 250, 222 represent the number of fruits(count) <br/>second column Apples, Bananas, Mangoes, Oranges represent fruit name<br/>third column 0, 0, 0, 0 represent the type (or some random thing) </p>
  
  <p>I need to extract the content from <strong>fruits.txt</strong> into other separate files based on the count of number of fruits in first column.<br/></p>
  
  <p>For example,<br/>
  if the count is in b/w 1 to 100, it should be stored in a file <strong>a.txt</strong><br/>
  Similarly, b/w 101 to 200 in <strong>b.txt</strong>,<br/> b/w 201 to 300 in <strong>c.txt</strong> and<br/>
  b/w 500 to 600 in <strong>d.txt</strong> </p>
  
  <p>Desired output:<br/><br>
  a.txt should have the following as its content:<br/></p>
  
  <pre><code>15 Apples 0
  </code></pre>
  
  <p>b.txt as:<br/></p>
  
  <pre><code>155 Bananas 0
  </code></pre>
  
  <p>c.txt as:<br/></p>
  
  <pre><code>250 Mangoes 0
  </code></pre>
  
  <p>d.txt as:<br/></p>
  
  <pre><code>555 Oranges 0
  </code></pre>
  
  <p>Any ideas to get the output using sed or awk or grep?</p>