title: Can't convert string to integer in shell
body: <p>I have a file <code>test.csv</code> with numbers:</p>
  
  <pre><code>&gt;cat test.csv
  32
  23
  45
  </code></pre>
  
  <p>I store the first value in a variable:</p>
  
  <pre><code>&gt;e=$(cat test.csv | head -n 1)
  &gt;echo $e
  32
  </code></pre>
  
  <p>However, I can't do arithmetic with this number, I have tried converting it to integer as explained <a href="https://unix.stackexchange.com/questions/232384/argument-string-to-integer-in-bash?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">here</a>:</p>
  
  <pre><code>&gt;echo "$((e + 1))"
  ")syntax error: invalid arithmetic operator (error token is "
  </code></pre>
  
  <p>EDIT: Issue might have to do with whitespaces, that I can't delete:</p>
  
  <pre><code>&gt;c="32"
  &gt;echo $c | wc -c
  3
  &gt;echo $c | wc -c
  4
  &gt;echo $c | tr -d '[:space]' | wc -c
  4
  </code></pre>