title: shell script in android gives [: not found
body: <p>I have this script which works on my linux machine</p>
  
  <pre><code>#!/bin/sh
  c=1
  if [ $c == 1 ]
  then
    echo c is 1
  else
    echo c is 0
  fi
  </code></pre>
  
  <p>But when I use this in android as follows:</p>
  
  <pre><code>#!/system/bin/sh
  c=1
  if [ $c == 1 ]
  then
    echo c is 1
  else
    echo c is 0
  fi
  </code></pre>
  
  <p>It gives an error like: </p>
  
  <pre><code>[: not found
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>Is there any other logic to check the value of <code>$c</code>, whether it is 1 or 0 ?</p>
  
  <p><strong>Android shell have problem with [] in if so is there any other way to check the value of c ?</strong></p>