zeraxis_ee
asked on
compare dates in shell script
I need to compare 2 dates (date now and one from a file) and if date now is 20 minutes more than the date in the file, the script needs to restart the browser.
cat lastplaylist gives me the date in the file:Fri Feb 13 05:48:51 GMT 2009
date gives me date and time now: Fri Feb 13 08:48:51 GMT 2009
I know I can restart the browser by
killall firefox
firefox http://mywebsite.com
I just don't know how to compare the 2 dates and see the difference in minutes.
Could someone help?
Many thanks
cat lastplaylist gives me the date in the file:Fri Feb 13 05:48:51 GMT 2009
date gives me date and time now: Fri Feb 13 08:48:51 GMT 2009
I know I can restart the browser by
killall firefox
firefox http://mywebsite.com
I just don't know how to compare the 2 dates and see the difference in minutes.
Could someone help?
Many thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER