mercredi 8 mars 2017

How can two dates be compared in a shell?

Here is an example of how I would like to use this, though it does not work as-is. i would like to use this specific timestamp only.

todate=2017-03-08T19:41:26Z
cond=2017-01-19T19:35:07.000Z

if [ [$todate - $cond] > 5 ];
then
    break
fi                           

How can I achieve the desired result?

Aucun commentaire:

Enregistrer un commentaire