title: Lookup variable value from string in shell script
body: <p>In bash, if I have:</p>
  
  <pre><code>y=10
  x='y'
  echo $x # prints 'y'
  </code></pre>
  
  <p>Now I want to get <code>$y</code> via $x:</p>
  
  <pre><code>echo ${$x} # error: "bad substitution"; I want to print 10
  </code></pre>
  
  <p>How do I lookup the variable value with name <code>$x</code>?</p>