title: Why is this bash IF statement not working?
body: <pre><code>if [[ $DATA == *?xml* ]]
  then
      if [[ $DATA == *misuse* ]]
      then echo "Misuse" &gt;&gt; $OUTPUTPAST2
      else echo "All Good" &gt;&gt; $OUTPUTPAST2
      fi
  else echo "Not xml" &gt;&gt; $OUTPUTPAST2
  fi
  </code></pre>
  
  <p>Where <code>$DATA</code> does not contain the string <code>?xml</code>I am expecting an output of <code>Not xml</code>, but I am getting output of <code>All Good</code>.</p>
  
  <p>What am I doing wrong?</p>