title: Cut number from string
body: <p>I want to cut several numbers from a <code>.txt</code> file to add them later up. Here is an abstract from the <code>.txt</code> file:</p>
  
  <pre><code>anonuser   pts/25       127.0.0.1   Mon Nov 16 17:24 - crash (10+23:07)  
  </code></pre>
  
  <p>I want to get the "10" before the "+" and I only want the number, nothing else. This number should be written to another <code>.txt</code> file. I used this code, but it only works if the number has one digit:</p>
  
  <pre><code>awk ' /^'anonuser' / {split($NF,k,"[(+0:)][0-9][0-9]");print k[1]} ' log2.txt &gt; log3.txt
  </code></pre>