title: Extract all numbers from a text file and store them in another file
body: <p>I have a text file which have lots of lines. I want to extract all the numbers from that file. 
  File contains text and number and each line contains only one number. 
  How can i do it using sed or awk in bash script?</p>
  
  <p>i tried </p>
  
  <pre><code>#! /bin/bash
  sed 's/\([0-9.0-9]*\).*/\1/' &lt;myfile.txt &gt;output.txt
  </code></pre>
  
  <p>but this didn't worked.</p>