title: Check if a field is an integer in awk
body: <p>I am using the following script to find the number of running connections on my mongodb-server.</p>
  
  <pre><code>mongostat | awk 'BEGIN{FS=" *"}{print "Number of connections: "$19}'
  </code></pre>
  
  <p>But every 10 lines, $19 carries a string, denoting a field name. </p>
  
  <p>I want to modify my script to print only if <code>$19</code> is an integer.</p>
  
  <p>I could try <code>FS = " *[^0-9]*"</code>, but it matches columns that start with number rather than giving selective printing.</p>