title: Trying to retrieve first 5 characters from string in bash error?
body: <p>I'm trying to retrieve the first 5 characters from a string and but keep getting a <code>Bad substitution</code> error for the string manipulation line, I have the following lines in my <code>teststring.sh</code> script:</p>
  
  <pre><code>TESTSTRINGONE="MOTEST"
  
  NEWTESTSTRING=${TESTSTRINGONE:0:5}
  echo ${NEWTESTSTRING}
  </code></pre>
  
  <p>I have went over the syntax many times and cant see what im doing wrong</p>
  
  <p>Thanks</p>