There are several ways to increment the date in Unix or Linux. Here are a few options:
date
command:date -d "today + 1 day"
This command will output the date for the next day. You can replace "1 day" with any other time interval, such as "2 weeks" or "3 months".
cal
command:cal `date +%m %Y` | sed -n '/^ /{n;p}'
This command will output the calendar for the current month, with the current day highlighted. You can use the -A
option to specify a number of months to add to the current date:
cal -A 3 `date +%m %Y` | sed -n '/^ /{n;p}'
This will output the calendar for three months after the current month.
awk
command:date +%Y%m%d -d "$(awk 'BEGIN{print strftime("%Y-%m-%d", systime()+86400*7)}')"
This command will output the date one week from the current date. You can replace "86400*7" with any other number of seconds to add to the current date.