title: bash scripting - removing trailing chars from the end of a string
body: <p>I have a string like that:</p>
  
  <p>rthbp-0.0.3-sources.jar</p>
  
  <p>And i want to get a new string called in someway (like string2) with the original string with just the version , so - '0.0.3' now rthbp- at the start will remain constant but after version "-" (-sources.jar)  may change.</p>
  
  <p>is that possible in bash, just to extract the version info ?</p>
  
  <p>I am doing this  - echo ${f:6} but only gives me 0.0.3-sources.jar</p>