I want the date of the coming Saturday after a given date.For example, for $date1=30-AUG-2015, Iwant the result 05-SEP-2015.I have tried all the commands below with no success:samba@samba:~$ date1=30-AUG-2015samba@samba:~$ date2=$(date --date='$date1 +next Saturday')date: invalid date $date1 +next Saturdaysamba@samba:~$ date1=30-AUG-2015samba@samba:~$ date2=$(date --date1='next Saturday')date: unrecognized option '--date1=next Saturday'Try 'date --help' for more information.samba@samba:~$ date1=30-AUG-2015samba@samba:~$ date -d $date1 next saturdaySun Aug 30 00:00:00 IST 2015samba@samba:~$ $date1 -d next saturday30-AUG-2015: command not found
Get date of next Saturday from a given date
shell script;date