title: Checking for null or character values in an if condition in shell script
body: <p>I am trying to combine two conditions that checks for character values or a null value.  For some reason they only work separately, when I try to combine them together in an "or" it gives me errors.  Am I missing something?</p>
  
  <pre><code>RETENTION= #either a character value or null value
  if [[ "$RETENTION" == +([a-zA-Z]) ]] || [ -z "$RETENTION"] ; then
   #bad input
   #exit 1
  </code></pre>
  
  <p>using an elif to do it separately will not work either.  Only one condition works.</p>