I have a date say 2015-12-30
. I want to find the day difference between this day and today's date.
Currently I am doing this
dest_date="2015-12-30"
now=`date +%Y-%m-%d`
echo "( `date -d $dest_date +%s` - `date -d $now +%s`) / (24*3600)" | bc -l
But this is giving error as
date: invalid date `+%s'
(standard_in) 1: parse error