title: Bash shell variable inside variables
body: <p>I'm pretty sure this can be done but I'm not quite sure what the correct syntax is:</p>
  
  <pre><code>dev=$(someprog1 -flag -flag);
  tpcli=$(someprog2 -flag);
  if [[ $tpcli = $(someprog3 -flag $dev -flag | grep stuff | cut -c 25-55) ]]; then
  blah;
  blah;
  </code></pre>
  
  <p>Basically I want to create the variable and add it inside a variable in side the IF statement.
  Any help would be greatly appreaciated.</p>