title: How to sort an array in Bash
body: <p>I have an array in Bash, for example:</p>
  
  <pre class="lang-none prettyprint-override"><code>array=(a c b f 3 5)
  </code></pre>
  
  <p>I need to sort the array. Not just displaying the content in a sorted way, but to get a new array with the sorted elements. The new sorted array can be a completely new one or the old one.</p>