let nextmonth=$curmonth+1 if [ "$nextmonth" -gt 12 ]; then nextmonth=1 let pyear=$curyear+1 fi #nextmonth="`printf '%.2d' $nextmonth`" let prevmonth=$curmonth-1 if [ "$prevmonth" -lt 1 ]; then prevmonth=12 let pyear=$curyear-1 fi