title: grep a number from the line and append it to a file
body: <p>I went through several grep examples, but don't see how to do the following. </p>
  
  <p>Say, i have a file with a line</p>
  
  <pre><code>! some test here and number -123.2345 text
  </code></pre>
  
  <p>i can get this line using </p>
  
  <pre><code>grep ! input.txt
  </code></pre>
  
  <p>but how do i get the number (possibly positive or negative) from this line and append it to the end of another file? Is it possible to apply grep to grep results? 
  If yes, then i could get the number via something like</p>
  
  <pre><code>grep -Eo "[0-9]{1,}|\-[0-9]{1,}"
  </code></pre>
  
  <p>p/s/ i am using OS-X</p>
  
  <p>p/p/s/ i'm trying to fetch data from several files and put into a single file for later plotting.</p>