title: How to use array in ash?
body: <p>For some reason, I can't use <code>bash</code> to build my script, the only way to do it is with <code>ash</code>, I have this sms auto responder script, each reply must be at max 160 chacters long, it looks like this:</p>
  
  <pre><code>#!/bin/sh
      reply="this is a reply message that contains so many words so I have to split it to some parts"
      array="${reply:0:5} ${reply:5:5} ${reply:10:5} ${reply:15:5} ${reply:20:5}"
      for i in $array
      do
      echo "send sms with the message: $i"
      done
  </code></pre>
  
  <p>but it ends up like this:</p>
  
  <pre><code>send sms with the message: this
  send sms with the message: is
  send sms with the message: a
  send sms with the message: reply
  send sms with the message: mess
  send sms with the message: age
  send sms with the message: t
  </code></pre>
  
  <p>What I want is something like this:</p>
  
  <pre><code>send sms with the message: this 
  send sms with the message: is a 
  send sms with the message: reply
  send sms with the message: messa
  send sms with the message: ge th
  send sms with the message: at co
  send sms with the message: ntain
  </code></pre>
  
  <p>So it splits by the number of characters instead of splitting by words, how can I do that?</p>