title: Manipulate string in file using shell
body: <p>I'm trying to modify a string in a file using shell script.</p>
  
  <p>What in the file <code>version.yaml</code>: </p>
  
  <pre><code>Version: 1.0.0-ghjjh
  </code></pre>
  
  <p>What I expect:
  Add a suffix <code>-{given argument}</code>to the version string given an argument if there is no suffix added yet. Otherwise modify the suffix using the given argument.</p>
  
  <p>For a given argument <code>0</code>:
  For the above file I provided, there is no suffix, the expected result is <code>Version: 1.0.0-ghjjh-0</code></p>
  
  <p>After this string in the file already has the suffix. Next time for a given argument <code>6</code>, the expected result is <code>Version: 1.0.0-ghjjh-6</code></p>
  
  <p>What's the simplest way to do this in shell script?</p>