title: Assign default value to variable if one not set, in Bash
body: <p>I know I can do:</p>
  
  <pre><code>echo ${var:-4}
  </code></pre>
  
  <p>to print <code>4</code> if <code>var</code> is null,</p>
  
  <p>but how to assign <code>-n</code> in this case..?</p>
  
  <p><code>echo ${var:--n}</code> does not work.</p>
  
  <p>although this does work..</p>
  
  <pre><code>echo ${var:---n}
  </code></pre>
  
  <p>but in that case it prints out <code>--n</code> and I need it to print <code>-n</code>.</p>