title: Building Dynamic Variable Names in KornShell
body: <p>I did a search but did not find anything quite like what I am trying to do. 
  I have a list of Server Hostnames &amp; IPs</p>
  
  <ul>
  <li>Servera | IPa</li>
  <li>Serverb | IPb</li>
  <li>Servern | IPn</li>
  </ul>
  
  <p>I want to cat this file and put each element into variables</p>
  
  <ul>
  <li>Server_Var_1</li>
  <li>IP_Var_1</li>
  <li>Server_Var_2</li>
  <li>IP_Var_2</li>
  <li>Server_Var_n</li>
  <li>IP_Var_n</li>
  </ul>
  
  <p>What I currently have is the following KornShell (ksh):</p>
  
  <pre><code>Counter=0
  cat hostfile|while read line; do
  Server_Var_"$Counter"=echo $line | awk -F"|" '{print $1}'
  IP_Var_"$Counter"=echo $line | awk -F"|" '{print $2}'
  echo $Server_Var_[*] $IP_Var_[*]
  done
  </code></pre>
  
  <p>Any help is appreciated.</p>