title: bash approach for ease of calling binary with large amount of parameters
body: <p>Trying to figure out the best way to automate running
  a command that takes a lot of parameters and changing
  some of them. Current approach is this:</p>
  
  <pre><code>#!/bin/bash
  
  # 5 more of these
  VALUE=42
  STUFF=12
  CHARLIE=96
  
  # Note that these are not sequential, just a bad example
  PARAM[0]='--oneparameter=17'
  PARAM[1]='--anotherparam=FOO'
  PARAM[2]='--yetanotherparam=BAR'
  PARAM[3]='--someparam4=314'
  # the above continues for 15 parameters or so
  # and then some ones like this one:
  PARAM[16]="--someparam=astring${STUFF}.foo"
  PARAM[20]="--someparam20=filename${VALUE}.foo"
  </code></pre>
  
  <p>Then I call the binary:</p>
  
  <pre><code>./mybinary ${PARAM[@]}
  </code></pre>
  
  <p>and all is well.</p>
  
  <p>Then I change some parameter for the second run:</p>
  
  <pre><code>PARAM[1]='--anotherparam=BAR'
  VALUE=84
  # Here I need to include all lines that depends on VALUE
  # for the parameter expansion to work
  PARAM[20]="--someparam20=filename${VALUE}.foo"
  
  ./mybinary ${PARAM[@]}
  </code></pre>
  
  <p>This continues for 30 runs or so...</p>
  
  <p>The above works but it's ugly and error-prone but I can't
  figure out a better way to do it!
  Any help is greatly appreciated!</p>
  
  <p>Thanks.</p>