title: How to compare the current date with past 60 days using shell script
body: <pre><code>start_time=`sed -e 's/\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]\).*/\1/' &lt;&lt;&lt; "$line"`
  start_time_sec=`date -d "$start_time" +%s`
  now=`date +%s`
  pass_time=`$now - $start_time_sec`
  if [ $pass_time &lt;=86400*60 ]
  then
  initial_time= $start_time
  initial_time_sec=`date -d "$initial_time" +%s`
  break
  </code></pre>
  
  <p>fi
     /<em>Here I have tried with date comparison with seconds, But I want in terms of days</em>/</p>