title: Extract version number from file in shell script
body: <p>I'm trying to write a bash script that increments the version number which is given in</p>
  
  <pre><code>{major}.{minor}.{revision}
  </code></pre>
  
  <p>For example.</p>
  
  <pre><code>1.2.13
  </code></pre>
  
  <p>Is there a good way to easily extract those 3 numbers using something like sed or awk such that I could increment the {revision} number and output the full version number string.</p>