Ubuntu server guide archive rotation script
Bug #1010805 reported by
Paul Worrall
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Server Guide |
Fix Released
|
Undecided
|
Doug Smythies |
Bug Description
The script provided under "Rotating NFS Archives" fails on the 8th and 9th days of each month with the error:
((: 08: value too great for base (error token is "08")
I'm no expert so please check this, but I think the reason is because $(date +%d) returns "08" or "09" and when the following arithmetic comparisons are executed bash tries to convert the string to a number but the leading zero signifies octal and 08 and 09 are not valid octal numbers.
The solution is to use $(date +%-d) the "-" tells date not to pad with zeroes.
Related branches
tags: | added: script serverguide |
Changed in ubuntu-docs (Ubuntu): | |
status: | New → Invalid |
no longer affects: | ubuntu-docs (Ubuntu) |
Changed in serverguide: | |
status: | New → Confirmed |
Changed in serverguide: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I can confirm that it works with $(date +%-d)
Using it with debian squeeze