title: The shell test operator of -eq not giving correct result
body: <p>In below code, whatever the letter i pass to test , the result is all wrong.
  Can someone help me, thanks.</p>
  <p>bash# cat test.sh</p>
  <pre><code>#!/bin/bash
  #Using eq
  if [[ ${1^^} -eq &quot;D&quot; ]]
   then
   echo &quot;Using eq: D&quot;
  else
   echo &quot;Using eq: Not D&quot;
  fi
  
  #Using ==
  if [[ ${1^^} == &quot;D&quot; ]]
   then
   echo &quot;Using ==: D&quot;
  else
   echo &quot;Using ==: Not D&quot;
  fi
  </code></pre>
  <p>bash:# ./test.sh o</p>
  <pre><code>Using eq: D
  Using ==: Not D
  </code></pre>
  <p>In a interactive shell, the result is still wrong:
  bash # letter='o'
  bash # if [[ ${letter^^} -eq 'D' ]]</p>
  <pre><code>&gt; then
  &gt; echo &quot;D&quot;
  &gt; else
  &gt; echo &quot;not D&quot;
  &gt; fi
  D
  </code></pre>