Error Token Is 09
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings value too great for base (error token is 0008 ) and policies of this site About Us Learn more about Stack Overflow value too great for base date the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation bash associative array value too great for base Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it
Bash Force Base 10
only takes a minute: Sign up Bash error: value too great for base (error token is “09”) up vote 11 down vote favorite 1 When running this part of my bash script am getting an error Script value=0 for (( t=0; t <= 4; t++ )) do d1=${filedates[$t]} d2=${filedates[$t+1]} ((diff_sec=d2-d1)) SEC=$diff_sec compare=$((${SEC}/(60*60*24))) value=$((value+compare)) done Output jad.sh: line 28: ((: 10#2014-01-09: bash base 10\ value too great for base (error token is "09") jad.sh: line 30: /(60*60*24): syntax error: operand expected (error token is "/(60*60*24)") d1 and d2 are dates in that form 2014-01-09 and 2014-01-10 Any solution please? bash share|improve this question asked Jan 10 '14 at 16:45 user3178889 66127 1 You can't just subtract dates in the form YYYY-MM-DD. You have to convert them to plain numbers first, like time_t timestamps (which will get you seconds). –Mark Reed Jan 10 '14 at 16:47 2 Looks like it's converting your 09 to octal notation, so chances are it's actually trying to compute 2014 - 1 - 9, but since 09 is not a valid number (the 0 at the front means use octal instead of decimal) it's complaining. –robbrit Jan 10 '14 at 16:49 what the solution robbirt? –user3178889 Jan 10 '14 at 16:59 add a comment| 4 Answers 4 active oldest votes up vote 23 down vote accepted Prepend the string "10#" to the front of your variables. That forces bash to treat them as decima
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other Support bash remove leading zeros Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation User Documentation Social Media
Bash Array Value Too Great For Base
Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity
Bash Value Too Great For Base 09
Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] value too great for base -bash Having an Issue http://stackoverflow.com/questions/21049822/bash-error-value-too-great-for-base-error-token-is-09 With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Results 1 to 9 of 9 Thread: [SOLVED] value too great for base -bash Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode January 25th, 2008 #1 sagarhshah View https://ubuntuforums.org/showthread.php?t=677751 Profile View Forum Posts Private Message A Carafe of Ubuntu Join Date May 2006 Location Mombasa, Kenya Beans 82 DistroUbuntu 10.04 Lucid Lynx [SOLVED] value too great for base -bash Hi, I am writing a script in bash. Everything works fine well almost!! I am only having one problem whenever this part of the script Code: if [ $((items)) -eq 0 ] ; then comes across a 08 or 09 it throws an error "value too great for base (error token is "09")" I read up on it and apparently it seems to think 08 or 09 are hex nos or something to that effect. I can't replace the 0's as I need them for later on in the script. does anybody have a workaround to this? any help would be appreciated thanks sagar Life's a journey. Enjoy the ride!! Adv Reply January 25th, 2008 #2 colo View Profile View Forum Posts Private Message Visit Homepage Frothy Coffee! Join Date Apr 2005 Location Austria Beans 246 DistroKubuntu Re: value too great for base -bash Why are you using an arithmetical expression in there ( "$((va
Oct 2008 22:48:35:000RED Version: 5.5.0.13 (build 70227) also confirmed in version 6The ôwait for a fileö logic of our generated Linux load https://support.wherescape.com/support/discussions/topics/4000312781 scripts is guaranteed to fail at specific times due to the time calculations. If the hour, minute, or seconds portion of the time is 08 or 09 then the script will generate errors like the following that are recorded in the Detail log:let: NOW_HH=09: value too great for base (error token is "09")let: NOW_MM=09: value too great for base (error token is "09")let: NOW_TIME=3600 + 1920 + 08: value too great for base (error token is "08") 2 CommentsOldest FirstPopularNewest FirstSorted by Oldest First W Website Integration User said over 1 year ago Logged by: SupportLogged at: 07 Oct 2008 13:14:10:000We will fix this for the next release value too great by piping through bc to ensure the lead 0's are removed W Website Integration User said over 1 year ago Logged by: SupportLogged at: 28 Oct 2008 14:20:27:000This has been fixed in version 6.0.2.0 Identified as CLOSEDITEM Number: 1012 Comments to this discussion are now closed! More topics in Archive: WhereScape RED Dimension View Criteria Setting Project view of load tables Start Menu Shortcut Not Working Renaming Objects Scheduler is failing to process tables Upgrade compilation errors Oracle 8 to 9 Load date conversion error Oracle to SQL Restoring the meta data through RED Problems adding primary key constraint Numeric value out of range in doc See all 4447 topics Home Solutions Forums Home Knowledge Community Search Cookie policy We use cookies to try and give you a better experience in Freshdesk. You can learn more about what kind of cookies we use, why, and how from our Privacy Policy. If you hate cookies, or are just on a diet, you can disable them altogether too. Just note that the Freshdes