title: Assigning default values to shell variables with a single command in bash
body: <p>I have a whole bunch of tests on variables in a bash (3.00) shell script where if the variable is not set, then it assigns a default, e.g.:</p>
  
  <pre><code>if [ -z "${VARIABLE}" ]; then 
      FOO='default'
  else 
      FOO=${VARIABLE}
  fi
  </code></pre>
  
  <p>I seem to recall there's some syntax to doing this in one line, something resembling a ternary operator, e.g.:</p>
  
  <pre><code>FOO=${ ${VARIABLE} : 'default' }
  </code></pre>
  
  <p>(though I know that won't work...)</p>
  
  <p>Am I crazy, or does something like that exist?</p>