08 minutes confuse splitting shell script
Closed this issue · 4 comments
GoogleCodeExporter commented
One of my videos have following Duration: 03:08:41.55.
The 08 minutes is treated by bash as an octal value, thus generating error
line 23: 08: value too great for base (error token is "08")
Original issue reported on code.google.com by skliarie@gmail.com
on 9 Apr 2011 at 7:46
GoogleCodeExporter commented
that's a surprise, I wasn't aware that bash arithmetic understood octal. Can
you try this?
- echo $((H*3600 + M*60 + S))
+ expr $H \* 3600 + $M \* 60 + $S
Original comment by tokland
on 9 Apr 2011 at 9:07
- Changed state: Accepted
GoogleCodeExporter commented
Yes, the fix helped, thank you.
Original comment by skliarie@gmail.com
on 10 Apr 2011 at 7:40
GoogleCodeExporter commented
r115
Original comment by tokland
on 10 Apr 2011 at 8:31
- Changed state: Fixed
GoogleCodeExporter commented
Original comment by tokland
on 13 May 2014 at 2:55