Can anyone help me to calculate the total minutes between below two dates.
date1= 2016-07-02 06:20:00
date2= 2016-07-04 15:00:00
the output should be in number for example the date diff is only 5 hours means i need the output like 5*60=300 minutes.
echo $((($(date -ud "$date2" +'%s') - $(date -ud "$date1" +'%s'))/60)) minutes