title: Is there a way to do multiple shell variable expansions/parameter substitutions?
body: <p>I have a line in a script that works in zsh but does not work in bash:</p>
  
  <pre class="lang-bsh prettyprint-override"><code>SHORTDIR=${${${PWD##*/}//./_dot_}//:/_colon_}
  </code></pre>
  
  <p>This is basically a short/efficient version of <code>basename $PWD | sed -e 's/\./0/g' -e 's/:/1/g'</code>. </p>
  
  <p>What's the syntax for stringing together variable expansions? </p>