title: Multi-dimensional arrays in Bash
body: <p>I am planning a script to manage some pieces of my Linux systems and am at the point of deciding if I want to use <a href="/questions/tagged/bash" class="post-tag" title="show questions tagged &#39;bash&#39;" rel="tag">bash</a> or <a href="/questions/tagged/python" class="post-tag" title="show questions tagged &#39;python&#39;" rel="tag">python</a>.</p>
  
  <p>I would prefer to do this as a Bash script simply because the commands are easier, but the real deciding factor is configuration.  I need to be able to store a multi-dimensional array in the configuration file to tell the script what to do with itself.  Storing simple key=value pairs in config files is easy enough with bash, but the only way I can think of to do a multi-dimensional array is a two layer parsing engine, something like</p>
  
  <pre><code>array=&amp;d1|v1;v2;v3&amp;d2|v1;v2;v3
  </code></pre>
  
  <p>but the marshall/unmarshall code could get to be a bear and its far from user friendly for the next poor sap that has to administer this.  If i can't do this easily in bash i will simply write the configs to an xml file and write the script in python.  </p>
  
  <p>Is there an easy way to do this in bash?</p>
  
  <p>thanks everyone.</p>