title: Meaning of "[: too many arguments" error from if [] (square brackets)
body: <p>I couldn't find any one simple straightforward resource spelling out the meaning of and fix for the following BASH shell error, so I'm posting what I found after researching it.</p>
  
  <p><strong>The error:</strong></p>
  
  <pre><code>-bash: [: too many arguments
  </code></pre>
  
  <p><strong>Google-friendly version:</strong> <code>bash open square bracket colon too many arguments</code>.</p>
  
  <p><strong>Context:</strong> an if condition in single square brackets with a simple comparison operator like equals, greater than etc, for example:</p>
  
  <pre><code>VARIABLE=$(/some/command);
  if [ $VARIABLE == 0 ]; then
    # some action
  fi 
  </code></pre>