How to print next day date in bash Linux

how to write program to print the next date while the input is today’s date in kali linux in the format DD-MMM-YYYY

Run the date command. For example following will print next day date:

date +"%d-%b-%Y" --date="next day"

You can input date as input using the following syntax:

input_date="26-Jan-2020"
date +"%d-%b-%Y" --date="${input_date} next day"

Make sure input_date set in DD-MMM-YYYY format only, otherwise you will get invalid date error:


See


Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki