title: bash split a variable into two or more based on character length
body: <p>I built a script for SMS autoresponder, my goal is that when an sms content has more than 160 of character length, it splits the content into two or more variables then send them separately.</p>
  
  <pre><code>myvar="this variable has more than ten character length"
  </code></pre>
  
  <p>That variable has 48 of character length, how do I print that variable from length 1 to length 25 and length 26 to 48 ? So i'll have 2 variables in the end and send those variables with sms:</p>
  
  <pre><code>firstvar="this variable has more th"
  secondvar="an ten character length"
  </code></pre>
  
  <p>I know there's a command <code>split</code> but my openwrt doesn't support that command, so I have to find another way to do that.</p>