title: Impossible bash: syntax error: invalid arithmetic operator (error token is "")
body: <p>I know there have been a lot of similar questions here but this is pretty special, please read on.</p>
  
  <p>I have a bash script that does nothing but comparing two numbers, basically like that:</p>
  
  <pre><code>[[ 1408039118 -lt 1401215749 ]]
  </code></pre>
  
  <p>Now, running that script throws the following error:</p>
  
  <pre><code>/usr/bin/pacaur: line 179: 1408039118: syntax error: invalid arithmetic operator (error token is "")
  </code></pre>
  
  <p>So I understand something must be wrong, this is my line 179:</p>
  
  <pre><code>[[ "${depsAlastmodified[$i]}" -lt 1401215749 ]] &amp;&amp; note "f" $"no AUR metadata for ${colorR}${depsAname[$i]}${reset} package"
  </code></pre>
  
  <p>Running this through <code>bash -x</code> shows:</p>
  
  <pre><code>+ [[ 1408039118 -lt 1401215749 ]]
  /usr/bin/pacaur: line 179: 1406628774: syntax error: invalid arithmetic operator (error token is "")
  </code></pre>
  
  <p>There is really nothing visible wrong with that. I tried some further debugging using <code>od -c</code> on that variable:</p>
  
  <pre><code>echo ${depsAlastmodified[$i]} | od -c
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>+ echo '1408039118'
  + od -c
  0000000   1   4   0   8   0   3   9   1   1   8 033   [   m 033   [   K
  0000020  \n
  0000021
  </code></pre>
  
  <p>But now I'm not sure how to read this. I understand the newline character is belonging to the echo command. But what is <code>033   [   m 033   [   K</code> exactly? And does this belong to my issue?</p>
  
  <p>I also tried running that number through <code>bc</code>:</p>
  
  <pre><code>echo ${depsAlastmodified[$i]} | bc | od -c
  </code></pre>
  
  <p>This is the output:</p>
  
  <pre><code>+ echo '1408039118'
  + bc
  + od -c
  (standard_in) 1: illegal character: ^[
  (standard_in) 1: syntax error
  (standard_in) 1: illegal character: ^[
  (standard_in) 1: illegal character: K
  0000000
  </code></pre>
  
  <p>Something is wrong with that variable. What else could I try? How to fix this?</p>
  
  <p>Just for reference, this is the <a href="https://github.com/Spyhawk/pacaur/issues/260" rel="nofollow">full issue history</a>.</p>