--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


This shows you the differences between two versions of the page.

Link to this comparison view

fixscriptvaluetoogreatforbase [2013/04/21 10:08] (current)
sjoerd created
Line 1: Line 1:
 += Fix: Script: Value Too Great For Base =
 +./​​ line 101: [[: 09: value too great for base (error token is "​09"​)
 +The error occurs when you have a integer value that start with a "​0"​ (zero). Bash will interpret that as an octal, which means 08 and 09 are invalid. I got the error by setting the hour in an variable and making an comparison on it:
 +hour=`date +%H`
 +You can force bash to read the number as a decimal by putting "​10#"​ in front of it:
 +hour="​10#​`date +%H`"
 +That fixed it.
 +{{tag>​fix scripts}}
fixscriptvaluetoogreatforbase.txt ยท Last modified: 2013/04/21 10:08 by sjoerd