title: how to extract a substring in bash
body: <p>I have the following string in bash with length > 4</p>
  
  <pre><code>str = "abcdefghijklmno"
  </code></pre>
  
  <p>and I want to extract into <code>str2</code> the 5 first charachter of <code>str</code>. So</p>
  
  <pre><code>str2="abcde"
  </code></pre>
  
  <p>How to do it with bash?</p>