title: /bin/dash: Bad substitution
body: <p>I need to do a string manipuilation in shell script (<code>/bin/dash</code>):</p>
  
  <pre><code>#!/bin/sh
  
  PORT="-p7777"
  echo $PORT
  echo ${PORT/p/P}
  </code></pre>
  
  <p>the last echo fails with <code>Bad substitution</code>. When I change shell to bash, it works:</p>
  
  <pre><code>#!/bin/bash
  
  PORT="-p7777"
  echo $PORT
  echo ${PORT/p/P}
  </code></pre>
  
  <p>How can I implement the string substitution in <code>dash</code> ?</p>