title: In bash, how to sort strings including numbers?
body: <p>I have a script that outputs file paths (via find) : </p>
  
  <pre><code>/foo/bar/example/foo/bar/example/foo-bar-example/1.2.3-something16
  /foo/bar/example/foo/bar/example/foo-bar-example/1.2.3.4-something1
  /foo/bar/example/foo/bar/example/foo-bar-example/1.2-something5
  /foo/bar/example/foo/bar/example/foo-bar-example/1.2.3.4-something2
  /foo/bar/example/foo/bar/example/foo-bar-example/1.2.3.4-something10
  </code></pre>
  
  <p>How can I list them in Bash so that they are in ascending numeric order based on the number at the end and regardless of the version ( 1.2, 1.2.3 or 1.2.3.4)</p>
  
  <p>Ps : the <code>something</code> part can eventually contain a dash.</p>
  
  <p>Desired output :</p>
  
  <pre><code>/foo/bar/example/foo/bar/example/foo-bar-example/1.2.3.4-something1
  /foo/bar/example/foo/bar/example/foo-bar-example/1.2.3.4-something2
  /foo/bar/example/foo/bar/example/foo-bar-example/1.2-something5
  /foo/bar/example/foo/bar/example/foo-bar-example/1.2.3.4-something10
  /foo/bar/example/foo/bar/example/foo-bar-example/1.2.3-something16
  </code></pre>
  
  <p>I used a temporary sentinel character to delimit the number at the end but it's a little bit complicated in my case.</p>