Arithmetic expressions in BASH

To perform arithmetic expressions in BASH you can use the following syntax:
$(( expression ))

For example you could do the following:

DATE=`date +"%G"`

DATE=$((${DATE}+1))
DATE=$((${DATE}--))

Last updated: 15/02/2007