title: How to find the length of an array in shell?
body: <p>How do I find the length of an array in shell?</p>
  
  <p>For example:</p>
  
  <pre><code>arr=(1 2 3 4 5)
  </code></pre>
  
  <p>And I want to get its length, which is 5 in this case.</p>