title: get " [: if-then: unexpected operator ",when searching all sub-folder in a folder
body: <p>when I run this script in my Ubuntu:</p>
  
  <pre><code>   for item in *
  do
      if  [ -d $item ]
      then
          echo $item
      fi
  done
  </code></pre>
  
  <p>I got this output:
  <a href="https://i.stack.imgur.com/oPMMY.jpg" rel="nofollow noreferrer">output</a></p>
  
  <p>I don't understand why I get "[: if-then: unexpected operator"</p>