Bug 150080

Summary: "value too great for base" when performing matematical mod (%)
Product: [Fedora] Fedora Reporter: cradford
Component: bashAssignee: Tim Waugh <twaugh>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-03-11 09:42:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description cradford 2005-03-02 09:20:11 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Description of problem:
The following command failed, but only for the ninth week of the year.
echo "$((`date +U` % 5))"
The `date` executable prepends an unnecessary leading zero to week 
nine (but not earlier weeks, IS THIS ALSO A BUG?). 
The following commands fail (whenever the digits 8 or 9 exist with 
the occurrance of leading zero):
echo "$((08 % 5))"
echo "$((09 % 5))"
echo "$((0800 % 5))"
echo "$((078 % 5))"
The following commands succeed
echo "$((07 % 5))"
echo "$((78 % 5))"

Version-Release number of selected component (if applicable):
exists on all versions (back to RH release 7.2)

How reproducible:
Always

Steps to Reproduce:
1.See Description
2.
3.
    

Additional info:

Comment 1 Tim Waugh 2005-03-11 09:42:54 UTC
The leading '0' indicates that the number is octal, and so having digits greater
than 7 is not allowed.