If this is not a homework assignment, please explain the company you work for and the nature of the problem you are working on. And, please show us what you have tried to solve this problem on your own (in CODE tags).
Do you really want to go from 00.00.00.99 to 00.00.01.99 or do you really want to go to 00.00.01.00? That is, is the intent to always have each element of the version number be a two-digit number where low order elements count from 00 through 99 and then resets to 00 when incrementing the next higher element? Or, does an element of the version number lock at 99 when the next higher order element increments from 00 through 99 as shown in post #1?
let says, i have this number as 000002080, i want to add 1 to make it 000002081, and then i want to add 1 to 000002082, add 1 to 000002083, 84.
i=000002080
TOT=$(echo "scale=9; $i + 1" | bc)
echo $TOT
it shows 2081, i want to retain 000002081, 000002082, 000002082, 000002084. (2 Replies)