Linux shell programming to calculate date

important point:

The value is too large to be the basis for arithmetic calculations:

If the number starts with 0, bash mistakenly thinks it is base, such as month=08, August, bash defaults to octal, if you want to convert to decimal, you need to write 10#${month}

 

Guess you like

Origin blog.csdn.net/qq_44985985/article/details/109508551