title: how to extract substring and numbers only using grep/sed
body: <p>I have a text file containing both text and numbers, I want to use grep to extract only the numbers I need for example, given a file as follow:  </p>
  
  <pre><code>miss rate 0.21  
  ipc 222  
  stalls n shdmem 112
  </code></pre>
  
  <p>So say I only want to extract the data for <code>miss rate</code> which is <code>0.21</code>. How do I do it with grep or sed? Plus, I need more than one number, not only the one after <code>miss rate</code>. That is, I may want to get both <code>0.21</code> and <code>112</code>. A sample output might look like this:</p>
  
  <pre><code>0.21 222 112
  </code></pre>
  
  <p>Cause I need the data for later plot.</p>