title: When I am trying to run bash script on android shell I am getting syntax error
body: <p>I changed the shell of android by pushing a complied binary of bash(because by default android shell is sh), even then syntax error remains.</p>
  
  <p>I invoked the script file as below:</p>
  
  <pre><code>sh Cstates.sh
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>declare -A stateMap
  for (( y=0; y&lt;`ls /sys/devices/system/cpu/cpu0/cpuidle |grep ^state[0-9]| wc -l`; y++ ))
  do 
     key=`cat /sys/devices/system/cpu/cpu0/cpuidle/state$y/name | sed 's/ //g'| sed 's/ *$//'`
     stateMap[$key]="state$y"
     if [[ $key != "POLL" ]]
     then
       possibleStates[$y]=$key
     fi
  done
  </code></pre>
  
  <p>The error I get is:</p>
  
  <pre><code>Cstates.sh[7]: syntax error: '((' unexpected
  </code></pre>