title: Bash parameter reference
body: <p>I want to refer to a parameter in bash by using a number generated by a sum. How do I do this?</p>
  
  <p>More specifically:</p>
  
  <pre><code>    #!/bin/bash
  
      $sum=${$1}
      echo $sum
  </code></pre>
  
  <p>When I execute the script ./script.bash A B C D, if $sum = 3, then I want to return C. How do I do this, does anyone know?</p>