title: How to split one string into multiple variables in bash shell?
body: <p>I've been looking for a solution and found similar questions, only they were attempting to split sentences with spaces between them, and the answers do not work for my situation.
  </p>
  <p>Currently a variable is being set to something a string like this:<br/>
  <code>ABCDE-123456</code><br/>
  and I would like to split that into 2 variables, while eliminating the &quot;<b>-</b>&quot;. i.e.:<br/>
  <code>var1=ABCDE</code><br/>
  <code>var2=123456</code><br/></p>
  <p>
  How is it possible to accomplish this?
  </p>
  <hr />
  <p>This is the solution that worked for me:<br/>
  <code>var1=$(echo $STR | cut -f1 -d-)</code><br/>
  <code>var2=$(echo $STR | cut -f2 -d-)</code><br/></p>
  <p>Is it possible to use the <b>cut</b> command that will work without a delimiter (each character gets set as a variable)?</p>
  <p><code>var1=$(echo $STR | cut -f1 -d?)</code><br/>
  <code>var2=$(echo $STR | cut -f1 -d?)</code><br/>
  <code>var3=$(echo $STR | cut -f1 -d?)</code><br/>
  <code>etc.</code></p>