title: Convert string into integer in bash script - "Leading Zero" number error
body: <p>In a text file, test.txt, I have the next information:</p>
  
  <pre><code>sl-gs5 desconnected Wed Oct 10 08:00:01 EDT 2012 1001
  </code></pre>
  
  <p>I want to extract the hour of the event by the next command line:</p>
  
  <pre><code>hour=$(grep -n sl-gs5 test.txt | tail -1 | cut -d' ' -f6 | awk -F ":" '{print $1}')
  </code></pre>
  
  <p>and I got "08". When I try to add 1,</p>
  
  <pre><code> 14 echo $((hour+1))
  </code></pre>
  
  <p>I receive the next error message:</p>
  
  <pre><code>./test2.sh: line 14: 08: value too great for base (error token is "08")
  </code></pre>
  
  <p>If variables in Bash are untyped, why?</p>