Author Topic: bash shell error : value too great for base  (Read 862 times)

Offline scotbuff

  • Sys Admin
  • UNIX User
  • *****
  • Posts: 174
  • Karma: +2/-0
    • View Profile
    • Scott.Buffington.me
bash shell error : value too great for base
« on: September 02, 2009, 11:52:08 am »
You can explicitly state the base of a number using base#number
Code: [Select]
if [ $((10#$item)) -eq 0 ] ; thenor
Code: [Select]
themonth=$((10#$monthcal+$1))
This option will have trouble if the number starts with a minus sign.
The '-' needs to be in front of the base like -10#009 for -9.